/*======================================
Copyright @ 2006 by TQV
 - TRAN QUANG VU -
 email: admin@hiepsiong.com
 tel: +84.091.890.1272
========================================*/

function linkto(linkto){
window.location=linkto;
return true;

}

function mover(src){

	var class_=src.className;

	src.style.cursor='pointer';

	if(class_.indexOf("_over")==-1 && class_.indexOf("_focus")==-1) src.className=class_+"_over";
	//else src.className=class_;

}

function mout(src){

	var class_=src.className;

	if(class_.indexOf("_over")>-1) src.className=class_.replace("_over","");

}

function mdown(src,code){
	var class_=src.className;
	
	if(class_.indexOf("_focus")==-1){

		if(class_.indexOf("_over")!=-1) src.className=class_.replace("_over","_focus");

		else src.className=class_+"_focus";

		}
	document.writeln(src.id);
	if(code!='') eval(code);

}

function menubar_focus(strid,src,jscode){

	var thisid=src.id;

	var thisclass=src.className;

	var idclass="";

	var elementid=strid.split(",");

	if(thisclass.indexOf('_focus')==-1) src.className=thisclass.replace("_over","")+"_focus";

	for(var i=0;i<elementid.length;i++){

		if(thisid!=elementid[i]){

			idclass=document.getElementById(elementid[i]).className

			document.getElementById(elementid[i]).className=idclass.replace("_focus","");

		}

	}

	if(jscode!='') eval(jscode);

}

function showsubmn(srcid){
	document.getElementById(srcid).style.display="block";
	}
	
function hidesubmn(srcid){
	document.getElementById(srcid).style.display="none";
	}
	
function showimg(imgsrc,title,info,rcm_){

	document.getElementById('proimg').innerHTML="";

	document.getElementById('proimg').innerHTML="<img border='0' width='465' height='311' src='catalogue/"+imgsrc+"'>";

	document.getElementById('detailtitle').innerHTML=title;

	document.getElementById('detailinfo').innerHTML=info;

	listrcm(rcm_);

}

function listrcm(rcm_){
	var rcmstr="<table border='0' cellspacing='1' cellpadding='1' width='100%'><tr><td class='information'>more:</td></tr><tr><td class='rcmlayer'>&nbsp;";
		var alen=new Array();
		alen=rcm_.split(",");
		if(alen.length>1)
		for(var i=0; i<alen.length; i++){ 
			rcmstr+="<img OnClick=\"showrcm('"+alen[i]+"');\" OnMouseOver='mover(this)' OnMouseOut='mout(this)' class='rcmimg' src='rcmimg/icon.gif'>";
		}
	rcmstr+="&nbsp;</td></tr></table>";
	document.getElementById('recommend').innerHTML=rcmstr;
}

function showrcm(imgsrc){

	document.getElementById('proimg').innerHTML="";

	document.getElementById('proimg').innerHTML="<img border='0' width='465' height='311' src='rcmimg/"+imgsrc+"'>";

}

function toleft(){

	document.getElementById('promar').scrollAmount=1;

	document.getElementById('promar').direction='left';

}

function tostop(){

	document.getElementById('promar').scrollAmount=0;

}

function toright(){

	document.getElementById('promar').scrollAmount=1;

	document.getElementById('promar').direction='right';

}

function show(src){

	document.getElementById(src).style.visibility="visible";

}

function hide(src){

	document.getElementById(src).style.visibility="hidden";

}
