function openPopup(fn,l,t,w,h){
	window.open(fn+".asp",fn,"left="+l+",top="+t+",width="+w+",height="+h+",toolbar=no,title=no,location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no");
}

function changePos(){
	if (document.all){
		if (document.body.offsetWidth > 800){
			document.all.menu1.style.left = (document.body.offsetWidth - 800)/2 + 307;
		}
		else{
			document.all.menu1.style.left = 307;
		}
	}
}


function showHideMenu(id,val){
	if (document.getElementById){
		// this is the way the standards work
		document.getElementById(id).style.display = val;
	}
	else if (document.all){
		// this is the way old msie versions work
		document.all[id].style.display = val;
	}
	else if (document.layers){
		// this is the way nn4 works
		document.layers[id].style.display = val;
	}
	if (curMenuNo == 3){
		val1 =  'block';
		if (val == 'block') val1 = 'none';
		if (document.getElementById){
			document.getElementById("chooseAnotherProduct").style.display = val1;
		}
		else if (document.all){
			document.all["chooseAnotherProduct"].style.display = val1;
		}
		else if (document.layers){
			document.layers["chooseAnotherProduct"].style.display = val1;
		}

	}
}


function menuBullet(menuNo){
	for (i=1;i<=7;i++) eval("bullet"+i).style.display='none';
	eval("bullet"+curMenuNo).style.display='block';
	if(curMenuNo!=menuNo){
		if(eval("bullet"+menuNo).style.display=='none')
			eval("bullet"+menuNo).style.display='block';
		else if(eval("bullet"+menuNo).style.display=='block')
			eval("bullet"+menuNo).style.display='none';
	}
}

function validateSearch(){
	if (searchAdmin.keyword.value.length == 0){
		alert("Please enter Keyword.");
		searchAdmin.keyword.focus();
		return false;
	}
	else if (searchAdmin.category.selectedIndex == 0){
		alert("Please choose where to Search.");
		searchAdmin.category.focus();
		return false;
	}
}