//BrowserTitle = "Gangneang"; // ???? ???
//document.title = BrowserTitle;

function windowo(targetURL,wName,w,h,tscrollbars,matrixL,matrixT,tstatus,resizable,direction,tlocation,tmenubar,ttoolbar,titlebar,fullscreen) {
	var wOption="width="+w+",height="+h;
	if(tscrollbars == null) { wOption = wOption+",scrollbars=no"; } else { wOption = wOption+",scrollbars=yes"; }
	if(matrixL == null) { wOption = wOption+",left=0"; } else { wOption = wOption+",left="+matrixL }
	if(matrixT == null) { wOption = wOption+",top=0"; } else { wOption = wOption+",top="+matrixL }
	wOption = wOption + "status=no, resizable=no,direction=no,location=no,menubar=no,toolbar=no,titlebar=no,fullscreen=no";
	// alert(wOption);
	window.open(targetURL,wName,wOption);
}

function flashWrite(url,w,h,id,bg,vars,win){
 var flashStr=
 "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
 "<param name='allowScriptAccess' value='sameDomain' />"+
 "<param name='movie' value='"+url+"' />";
 "<param name='menu' value='false' />"+
 "<param name='quality' value='high' />"+
 "<param name='base' value='.'>";

 if(vars) flashStr += "<param name='FlashVars' value='"+vars+"' />";
 if(win) flashStr += "<param name='wmode' value='"+win+"' />";
 if(bg) flashStr += "<param name='bgcolor' value='"+bg+"' />";

 flashStr += "<embed src='"+url+"' FlashVars='";
 if(vars) flashStr += vars;
 flashStr += "' wmode='";
 if(win) flashStr += win;
 flashStr += "' menu='false' quality='high' bgcolor='";
 if(bg) flashStr += bg;
 flashStr += "' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/etflashplayer' /></object>";

 document.write(flashStr);
 }

function ParseValue(len) {
	ParseDepth = new Array();
	len = len+"";
	for(i=0;i<len.length;i++) {
	ParseDepth[i] = len.substring(i,i+1);
	}

	return ParseDepth;
}

function menuover() {
	this.src = this.src.replace(".gif", "_on.gif");
}

function menuout() {
	this.src = this.src.replace("_on.gif", ".gif");
}

function getflash(URL,width,height,wmode) {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+URL+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="'+wmode+'">');
document.write('<embed src="'+URL+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>');
}

