
function doPostBack(eventTarget, eventArgument) {
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
		theform = document.Form1;
	}
	else {
		theform = document.forms["Form1"];
	}
	theform.EVENTTARGET.value = eventTarget.split("$").join(":");
	theform.EVENTARGUMENT.value = eventArgument;
	theform.submit();
}

function ObjHtmlWrite(ObjId)
{
	var oObjHtml = document.all[ObjId];
	var sHtml = "";
	if(oObjHtml != null){
		sHtml = oObjHtml.innerHTML;
		sHtml = sHtml.replace("<!--","");
		sHtml = sHtml.replace("-->","")
		document.writeln(sHtml);
	}
}
function DocumentWrite(sHtml)
{
	document.writeln(sHtml);
}
function calcIframeHeight(iframeName)
{
	//find the height of the internal page
	var the_frm = document.getElementById(iframeName);
	if(the_frm != null)
	{
		var the_height=
			the_frm.contentWindow.document.body.scrollHeight;
	
		//change the height of the iframe
		the_frm.height = the_height;
	}	
}
function SetItemTextHeight(ItemBgId,ItemTextId,iHeightOfset)
{
	var oItenBg = document.getElementById(ItemBgId); 
	var oItenText = document.all(ItemTextId); 
	
	if(oItenBg != null && oItenText != null){
		oItenBg.style.height = oItenText.parentElement.clientHeight+iHeightOfset;
		oItenText.style.visibility = "visible";
	}
	DisplayOverFrame();
}
function DisplayOverFrame()
{
	if ((screen.height == 600) && (screen.width == 800)) {
		var oItem = document.getElementById('frame_left');
		if(oItem != null)
			oItem.style.display="none";
		oItem = document.getElementById('frame_right');
		if(oItem != null)
			oItem.style.display="none";
		oItem = document.getElementById('frame_bot');
		if(oItem != null)
			oItem.style.display="none";
	}
}

function ShowTermOfUs()
{
	var oTermOfUs = document.getElementById('TermOfUs');
	if(oTermOfUs != null){
		oTermOfUs.style.display="";
	}
}
function WriteHeader(iMenuIndex)
{
	var sSrc = "header.swf";
	var sWidth = "776";
	var sHeight = "146";
	
	if(iMenuIndex != null)
		sSrc = sSrc+"?MenuIndex="+iMenuIndex;
	WriteFlashObj(sSrc,sWidth,sHeight);
}
function WriteFooter(iMenuIndex)
{
	var sSrc = "footer.swf";
	var sWidth = "776";
	var sHeight = "156";
	
	if(iMenuIndex != null)
		sSrc = sSrc+"?MenuIndex="+iMenuIndex;
	WriteFlashObj(sSrc,sWidth,sHeight);
}
function WriteFlashObj(sSrc,sWidth,sHeight,bTrans)
{
	var sObj = "";
	var sWMode = "";
	var sObjID = sSrc.replace(".swf","");
	var oLang = document.getElementById('ItemLang');
	var sLang = "Lang=";
	if(oLang != null){
		sLang = sLang+oLang.value;
		if(sSrc.indexOf("?")>0)
			sLang = "&"+sLang;
		else
			sLang = "?"+sLang;
		sSrc = sSrc+sLang;
	}
		
	sObj = sObj+"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab' width='"+sWidth+"' height='"+sHeight+"' id='"+sObjID+"' allowfullscreen='true' align='middle' VIEWASTEXT>";
	sObj = sObj+"<param name='allowScriptAccess' value='sameDomain' />";
	sObj = sObj+"<param name='allowFullScreen' value='true' />";
	sObj = sObj+"<param name='movie' value='"+sSrc+"' />";
	sObj = sObj+"<param name='quality' value='high' />";
	sObj = sObj+"<param name='bgcolor' value='#ffffff' />";
	if(bTrans == true){
		sObj = sObj+"<PARAM NAME='WMode' VALUE='Transparent'>";
		sWMode = "wmode='transparent'";
	}
	sObj = sObj+"<embed src='"+sSrc+"' quality='high' bgcolor='#ffffff' "+sWMode+" width='"+sWidth+"' height='"+sHeight+"' ID='"+sObjID+"' NAME='bg' align='middle' allowScriptAccess='sameDomain'  allowfullscreen='true' swLiveConnect=true ID='bg' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	sObj = sObj+"</object>";
	
	DocumentWrite(sObj);
	//alert(sSrc);
}