﻿// JScript File

function DisplayFlash(path, width, height)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="movie" value="' + path + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="menu" value="false" />');
	document.write('<embed src="' + path + '" quality="high" pluginspage="//www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '">');
	document.write('</embed>');
	document.write('</object>');
}

//-- PopUp Control --------------------------------------------------------------//
function popWindow(url, height, width)
{
	window.open(url ,"PopUp","menubar=no,width="+width+",height="+height+",toolbar=no,scrollbars=no,status=no,top="+(screen.availHeight-height)/2+",left="+(screen.availWidth-width)/2);
}
//-------------------------------------------------------------------------------//

//-- Text Counter ---------------------------------------------------------------// 
var bName = navigator.appName; 

function taLimit(taObj, maxLen) 
{ 
	if (taObj.value.length==maxLen) 
		return false; 

	return true; 
} 

function taCount(taObj,Cnt, maxLen) 
{ 
	objCnt=createObject(Cnt); 
	objVal=taObj.value; 

	if (objVal.length>maxLen) 
		objVal=objVal.substring(0,maxLen); 

	if (objCnt) 
	{ 
		if(bName == "Netscape") 
			objCnt.textContent=maxLen-objVal.length; 
		else 
			objCnt.innerText=maxLen-objVal.length; 
	} 

	return true; 
} 

function createObject(objId) 
{ 
	if (document.getElementById) 
		return document.getElementById(objId); 
	else if (document.layers) 
		return eval("document." + objId); 
	else if (document.all) 
		return eval("document.all." + objId); 
	else 
		return eval("document." + objId); 
} 

//-------------------------------------------------------------------------------//