/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ function SetFocus(TargetFormName) { var target = 0; if (TargetFormName != "") { for (i=0; i 7) { if (strFormatString.indexOf('mmm') == -1) { strMonth = strDateToCheck.substring(strFormatString.indexOf('mm'), 2); } else { strMonth = strDateToCheck.substring(strFormatString.indexOf('mmm'), 3); } strDay = strDateToCheck.substring(strFormatString.indexOf('dd'), 2); strYear = strDateToCheck.substring(strFormatString.indexOf('yyyy'), 2); } else { return false; } } if (strYear.length != 4) { return false; } intday = parseInt(strDay, 10); if (isNaN(intday)) { return false; } if (intday < 1) { return false; } intMonth = parseInt(strMonth, 10); if (isNaN(intMonth)) { for (i=0; i 12 || intMonth < 1) { return false; } intYear = parseInt(strYear, 10); if (isNaN(intYear)) { return false; } if (IsLeapYear(intYear) == true) { intDaysArray[1] = 29; } if (intday > intDaysArray[intMonth - 1]) { return false; } return true; } function IsLeapYear(intYear) { if (intYear % 100 == 0) { if (intYear % 400 == 0) { return true; } } else { if ((intYear % 4) == 0) { return true; } } return false; } /* Customization */ $(document).ready(function(){ /*$(".leftmenu_item").hover(function(){ $(this).find("a").css("color", "#BA125F"); }, function(){ $(this).find("a").css("color", "#E6E6E6"); });*/ $(".leftmenu_item").hover(function(){ $(this).find("a").stop().animate({"color": "#BA125F"}, "fast"); }, function(){ $(this).find("a").stop().animate({"color": "#E6E6E6"}, "fast"); }); $(".subMenu a").hover(function(){ $(this).css("color","#DF63A0"); },function(){ $(this).css("color","#F6C8D4"); }); $(".topmenu").hover(function(){ $(this).css("color", "#000000"); $(this).find("ul").show(); $(this).find("ul").fadeIn("fast"); }, function(){ $(this).css("color", "#BA125F"); $(this).find("ul").fadeOut("fast"); }); $(".topmenu ul li").hover(function(){ $(this).css("background-color", "#9F9F9F"); }, function(){ $(this).css("background-color", "#000000"); }); $(".search_box").focus(function(){ if ($(this).val() == "SEARCH") { $(this).val(""); } }); $(".search_box").blur(function(){ if ($(this).val() == "") { $(this).val("SEARCH"); } }); }); function submit_review( id, val ){ var str = "reviews_id="+id+"&is_useful="+val; $.post("reviews_useful_act.php", str, function(data){ num = data.split(","); $("#review_useful_"+id).hide(); $("#review_voting_"+id).html( num[0]+' of '+num[1]+' people find this useful.' ); }); }