﻿<!--

//下拉菜单
function menu_action(sender) {
   var lis = sender.getElementsByTagName("li");
   for (key in lis) {
    lis[key].onmouseover=onMouseOver;
    lis[key].onMouseDown=onMouseDown;
    lis[key].onMouseUp=onMouseUp;
    lis[key].onmouseout=onMouseOut;
   }
   sender.onmouseover = null;
}
function onMouseOver(){OnMouse(this,"block")}
function onMouseDown(){OnMouse(this,"block")}
function onMouseUp(){OnMouse(this,"none")}
function onMouseOut(){OnMouse(this,"none")}
function OnMouse(Obj,Display){
   var ul = Obj.getElementsByTagName("ul")[0];
   if(ul!=null){
    ul.style.display=Display;
   }
}

//分类菜单
function opencat(cats,imgs,url){
    var cat=document.getElementById(cats);
	var img=document.getElementById(imgs);
	if(cat.style.display=="none"){
	cat.style.display="";
	img.src=url+"images/class2.gif";
	}	else {
	cat.style.display="none"; 
	img.src=url+"images/class1.gif";
	}
}

//
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
  }
  
// 
function showDiv(objId){
   var objDiv=document.getElementById(objId);   
   if(objDiv.style.display=="none"){
      objDiv.style.display="";
   }else{
   objDiv.style.display="none";
   }
}
//
function CheckUserForm()
{
	if (document.payment.forward.value.length == 0) {
		alert("Please Select Forward.");
		document.payment.forward.focus();
		return false;
	}
	if (document.payment.Country.value.length == 0) {
		alert("Please Select Country.");
		document.payment.Country.focus();
		return false;
	}
	if (document.payment.Subject.value.length == 0) {
		alert("Please input Subject");
		document.payment.Subject.focus();
		return false;
	}	
	if (document.payment.Receiver.value.length == 0) {
		alert("Please input contact person.");
		document.payment.Receiver.focus();
		return false;
	}
	if (document.payment.Email.value.length == 0) {
		alert("Please input  Email.");
		document.payment.Email.focus();
		return false;
	}
	if (document.payment.Email.value.length > 0 && !document.payment.Email.value.match( /^.+@.+$/ ) ) {
	    alert("EMAIL wrong.");
	    document.payment.Email.focus();
		return false;
	}
	return true;
}
//
function CheckShipForm()
{
	var chk=false;
			
	for(var i=0;i<document.myform.forward.length;i++){
	chk|=document.myform.forward[i].checked;		       
	}
	if(!chk){
	alert("Please Select Forward.");
	return false;
	}
}
//
function secBlue1(obj1,obj2,n,m){
	for(i=1;i<m;i++){
		eval("document.getElementById('"+obj1+i+"').className='gray-Normal'");
	}
		eval("document.getElementById('"+obj1+n+"').className='gray-Selected'");
	//显示
	for(i=1;i<m;i++){
		eval("ele_hide = document.getElementById('"+obj2+i+"')");
		ele_hide.style.display = "none";
	}
		eval("ele_play = document.getElementById('"+obj2+n+"')");
		ele_play.style.display = "";
}


//阴影效果
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",20)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=45
}

function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}



-->
