// JavaScript ÎÄµµ

function changeMenuBg(obj, isOver){
	if(obj && obj.getAttribute("active")!="true")
	obj.style.backgroundImage=isOver ? "url(images/b1.jpg)" : "url(images/b2.jpg)";
}

function changeBorder(obj, isOver){
		obj.style.border = isOver ? "#0000FF 1px solid" : "#F6F6F6 1px solid"
}
function  reSizeImage(ImgObj, reWidth, reHeight){
	reWidth = reWidth || 300; reHeight=reHeight || 260;
	var image=new  Image(); image.src=ImgObj.src;
	if(image.width>0 && image.height>0){
		if(image.width / image.height >=  reWidth / reHeight){
			if(image.width > reWidth){
				ImgObj.width  = reWidth;
				ImgObj.height = (image.height * reWidth) / image.width;
			}else{
				 ImgObj.width = image.width;
				 ImgObj.height= image.height;
			}
        }else{
			if(image.height > reHeight){
				ImgObj.height =reHeight;
				ImgObj.width  =(image.width*reHeight) / image.height;
				}else{
					ImgObj.width  =image.width;
					ImgObj.height =image.height;
			}
		}
	}
}
function show(obj,isImg){
			if(isImg){
				obj=document.getElementById(obj.getAttribute("id").replace("img","span"));
			}
			var fors=obj.getAttribute("fors");
			var forsNode=document.getElementById(fors);
			
			if(forsNode){
				if(forsNode.getAttribute("open")=="false"){
					//o
					forsNode.setAttribute("open","true");
					document.getElementById(fors+"img").src=document.getElementById(fors+"img").src.replace("close","opene")
					forsNode.style.display="";
				}else if(forsNode.getAttribute("open")=="true"){
					//c
					forsNode.setAttribute("open","false");
					document.getElementById(fors+"img").src=document.getElementById(fors+"img").src.replace("opene","close")
					forsNode.style.display="none";
				}
			}
			if(isImg)return true;
			var temp=obj.getAttribute("href");
			if(temp!="null" && temp!=""){
				//r
				var e="?"
				if(temp.indexOf("?")>=0){e="&"}
				var u=document.URL.toLowerCase();
				if(u.indexOf("product")<0){
					window.location.href=temp+e+"ssad="+(Math.random()*1000)+"&ow="+obj.innerText;
				}else{
					var te=document.getElementById("iframe1");
					if(te)te.src=temp+e+(Math.random()*1000);
				}
			}
			return false;
}