var timeOn = 0;
function show(){
	var y=parseInt(document.getElementById('content').offsetTop);
	var x=parseInt(document.getElementById('outer').offsetLeft);
	var xx=parseInt(document.getElementById('overall').offsetLeft);
	var z=document.getElementById("sortpage");
	if (!is_ie){	
		document.getElementById("shopcart").style.left = x + 485 +'px';
		document.getElementById("shopcart").style.top = y - 11 + 'px';	
	}
	if (is_safari){
		document.getElementById("shopcart").style.left = x + 485 +'px';
		document.getElementById("shopcart").style.top = y - 5 + 'px';		
	}
	if (is_ie6down){	
		document.getElementById("shopcart").style.left = xx + 489 +'px';
		document.getElementById("shopcart").style.top = y + 83 + 'px';		
	}
	if (is_ie && is_major >= 7){
		document.getElementById("shopcart").style.left = x + 666 +'px';
		document.getElementById("shopcart").style.top = y + 83 + 'px';		
	}	
	document.getElementById("shopcart").style.display = "block";
	if (z != null){
		document.getElementById("sortpage").style.visibility = "hidden";
 	}
}

function hide(){
 z=document.getElementById("sortpage");
 document.getElementById("shopcart").style.display = "none";
	if (z != null){
 		document.getElementById("sortpage").style.visibility = "visible";
	}
}

function checkInspect(event){
	var check = event;
	if (check == 'mouseover'){
		if (timeOn!=0) {
		 	clearTimeout(timeOn)
		}	
	}
	if(check == 'mouseout'){
	 	timeOn = setTimeout("hide()", 400)	
	}
}

function formQueryString(catId1, catName1, catId2, catName2,catId3, catName3) {				
	if((catId3 != null && catId3.equals !="") && (catName3 != null && catName3 != "")){
		window.location = "/catalog.do?category=" + catId1 + "&categoryName=" + 
						window.escape(catName1)   + "&secondCategory=" + catId2 + "&secondCatName=" + window.escape(catName2)+ 
							"&thirdLevelCategory=" + catId3 + "&thirdLevelCatName=" +  window.escape(catName3);
	}
	else if((catId2 != null && catId2 != "") && (catName2 != null && catName2 !="" )){
		window.location = "/catalog.do?category=" + catId1 + "&categoryName=" + window.escape(catName1)   + "&secondCategory=" + catId2 + "&secondCatName=" + window.escape(catName2);
	}
	else{
		window.location =  "/catalog.do?category=" + catId1 + "&categoryName=" + window.escape(catName1);	
	}
}
