function setTab(name, itemCnt, curItem, classHide, classShow) {    for (i = 1; i <= itemCnt; i++) {        eval("document.getElementById('tab_" + name + "_" + i + "').className='" + classHide + "'");    }    eval("document.getElementById('tab_" + name + "_" + curItem + "').className='" + classShow + "'");    for (i = 1; i <= itemCnt; i++) {        eval("ele_hide = document.getElementById('con_" + name + "_" + i + "')");        if (ele_hide) ele_hide.style.display = "none";    }    eval("ele_play = document.getElementById('con_" + name + "_" + curItem + "')");    if (ele_play) ele_play.style.display = "block";}var pause = false;var con_num = 3;var startIndex = 1;function setLoop() {    try {        var oScroll = document.getElementById('index_banner');        oScroll.noWrap = true;        oScroll.onmouseover = function(e) { pause = true; };        oScroll.onmouseout = function(e) { pause = false; };        setInterval('scrollTopHome()', 3000);    } catch (e) { 	}}function scrollTopHome() {    if (pause) return;    startIndex += 1;    if (startIndex > con_num) { startIndex = 1; }    setTab('indexbanner', 3, startIndex, 'bannerout', 'bannerover');}jQuery(document).ready(function() {    setLoop();});$(document).ready(function(){$("#image-submit").click(function(){$("#hide-cate").slideDown("fast");});});$(document).ready(function(){ $("#hide-cate >li").click( function () { document.getElementById('image-submit').innerHTML = $(this).text();$("#hide-cate").slideUp("slow"); document.getElementById('hide_cateid').value=$(this).find("a").attr('rel'); }); });$(document).ready(				  function(){ 				  $("#catebox > ul >li.c-level-1").hover(												  function(){													   $(this).find(".acate").addClass("hover"); 													  $(this).find("div").css("display","block");												  },function(){													  $(this).find(".acate").removeClass("hover"); 													  $(this).find("div").css("display","none");												  }												);				  }				  );$(document).ready(function(){$("#seeall").hover(function(){$("#hidecatebox").slideDown("fast");},function(){$("#hidecatebox").slideUp("slow");});});$(document).ready(function(){ $("#hidecatebox > ul >li.c-level-1").hover(												  function(){													   $(this).find(".acate").addClass("hover"); 													  $(this).find("div").css("display","block");												  },function(){													  $(this).find(".acate").removeClass("hover"); 													  $(this).find("div").css("display","none");												  }												);				  }				  );$(document).ready(function(){ 						    $("#pcontent > .toptit > a.d").click(								function(){									$(this).removeClass("hover").addClass("d");								 $("#pcontent > .toptit > a.rhover").removeClass("rhover").addClass("r");								 $("#desbox").show("fast");								  $("#reviewbox").hide("fast");								}							)						   						   }				  				  );$(document).ready(function(){ 						    $("#pcontent > .toptit > a.r").click(								function(){									$(this).removeClass("r").addClass("rhover");								 $("#pcontent > .toptit > a.d").removeClass("d").addClass("hover");								 $("#desbox").hide("fast");								  $("#reviewbox").show("fast");					 								}							)						   						   }				  				  );function changeclass(divid,classname){	document.getElementById(divid).className=classname;}function cs(par,starid,no){	for(var i=1;i<=no;i++){		if(i<=starid){			changeclass(par+i,'select');		}else{			changeclass(par+i,'');		}	}	document.getElementById(par+'input').value=starid;}function SubjectEmail() {    var txtEmail = jQuery("#indexemail").val();    if (ValidMail(txtEmail) && txtEmail != '') {        var href = "index.php?main_page=subscribe&txtEmail=" + txtEmail;        jQuery.get(href, function(data) {                alert("Subscribe successful!");        });    }    else {        alert("Please check your e-mail address.\n\rYour email address should look like \"myname@gmail.com\"");    }}function ValidMail(input) {    var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;    if (reg.test(input))        return true;    else        return false;}
