var version = navigator.appVersion;

if (version.indexOf("Mac") != -1) {
//  document.write('<link rel=stylesheet href=../html//"help_mac.css/" TYPE=\"text/css\">');
}
else if (version.indexOf("Windows") != -1) {
//  document.write('<link rel=stylesheet href=../html//"../zControl/mystyle.css/" TYPE=\"text/css\">');
  document.write('<title>.: Hoi Hoa Xuan THANH PHO HO CHI MINH - Designed by AnMinh Co., Ltd. Tel: 08 9304605:.</title>'); 
}


//begin Layer
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//end Layer

//begin Menu Skin 1
function toggleProcedure(currProcedure) {
	if (version.indexOf("Windows") != -1) {
		thisProcedure = document.getElementById("procedure"+currProcedure).style;
		thisExpander = document.getElementById("expander"+currProcedure);
		if (thisProcedure.display == "block") {
			thisProcedure.display = "none";
			thisExpander.src = "../images/expand.gif";
		}
		else {
			thisProcedure.display = "block";
			thisExpander.src = "../images/collapse.gif";
		}
	}
	return false
}
//end Menu

//begin Menu Skin 2
	function turnTD(tdName, lDisplay)
	{
		var objTD= getObj(tdName)
		if (lDisplay) objTD.style.display= "inline"
		else objTD.style.display= "none";
		return lDisplay;
	}
	function getObj(objName){return document.getElementById(objName);}

	function turnDivOFF(aID)
	{
		getObj(aID).style.display="none";
	}
	function turnDiv(aID)
	{
		var arrID= [aID]
		var arrHeight= [180];
		var aHeight;
		for (i=0;i<arrID.length;i++)
		{
			if (aID!=arrID[i]) turnDivOFF(arrID[i])
			else aHeight= arrHeight[i];
		}
		if (aID==null) return;
		var objDiv= getObj(aID);
		if (objDiv.style.display=="inline") {turnDivOFF(aID); return;}
		objDiv.style.left= event.screenX;
		objDiv.style.top= event.screenY- aHeight;
		objDiv.style.display="inline";
	}
//end Menu

//begin myGhost
function myGhost() {
	for(var i=0; i<document.images.length; i++) {
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='image');\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}	
//end myGhost

//begin Flash
function ZFlash(movieName, movieWidth, movieHeight) {
	var movieID = movieName.replace(/.swf/g, "");
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+movieWidth+'" height="'+movieHeight+'" id="'+movieID+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+movieName+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" display="none" />');
	document.write('<param name="wmode" value="transparent" />');		
	document.write('<embed src="../zControl/'+movieName+'" WMODE="transparent" quality="high" width="'+movieWidth+'" height="'+movieHeight+'" name="'+movieID+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
//end Flash

//begin menu Skin2
function control_setup() {
	//start Button
	eval("document.all." + main_nav + "_spacer.width=1");
	eval("document.all." + main_nav + ".removeAttribute('href')");
	eval("document.all." + main_nav + "_div.className = 'nav_header_selected'");
	eval("document.all." + main_nav + "_img.className = 'colorDown'");
	//end Button
}

function setup() {
	eval("document.all." + iconNumpage + ".src = '" + "../images/pro" + "_1" + "_ghost.gif'");
	eval("document.all." + iconNumpage + "_lnk" + ".className = 'ghost'");		
	eval("document.all." + iconNumpage + "_lnk" + ".removeAttribute('href')");
}

function setup1() {
	footer_setup(main_nav);
}

function footer_setup(main_nav){
	eval("document.all.bot_nav_" + main_nav + ".className = 'nav_bottom_selected'");		
	eval("document.all.bot_nav_" + main_nav + ".removeAttribute('href')");
}
//end menu Skin2
