// JavaScript Document
function fnpop(win)
{
	newwin = window.open(win, 'window1', 'toolbar=0, scrollbars=no, status=0, location=0, resizable=0, menubar=0, width=576, height=353, left =50, top =50')
}
function fndisplay(data,tab)
{
	if(document.getElementById(data).style.display == "inline")
	{
		document.getElementById(data).style.display = "none";
		tab.className = "none"
	}
	else
	{
		for(i=1; i<5; i++)
		{
			document.getElementById("data"+i).style.display = "none";
			document.getElementById("tab"+i).className = ""
		}
		document.getElementById(data).style.display = "inline";
		tab.className = "Tabbg2"
	}	
}
function fnShowPL(Tabbg, PdtLst) 
{
	if(document.getElementById(PdtLst).style.display == "none")
	{
		document.getElementById(Tabbg).className = "Tabbg"
		document.getElementById(PdtLst).style.display = "block"
	}
	else 
	{
		document.getElementById(Tabbg).className = "TabbgY"
		document.getElementById(PdtLst).style.display = "none"
	}
}
function fnShowPdt(PdtLst) 
{
	document.getElementById(PdtLst).style.display = "block"
}
function fnHidePdt(PdtLst) 
{
	document.getElementById(PdtLst).style.display = "none"
}
function getQueryVariable(variable)
{
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++)
	{
		var pair = vars[i].split("=");
		if (pair[0] == variable)
		{
			return pair[1];
		}
	}
}
function fnload()
{
	if(getQueryVariable("data"))
	{
		//alert(getQueryVariable("data"))
		for(i=1; i<5; i++)
			{
				document.getElementById("data"+i).style.display = "none";
				document.getElementById("tab"+i).className = ""
			}
			document.getElementById("data" + getQueryVariable('data')).style.display = "inline";
			document.getElementById("tab" + getQueryVariable('data')).className = "Tabbg2"
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
function fntxtsize(txtsize)
{
	document.getElementById("maintable").className = txtsize
}
function isEmailAddress(WsCheck)
{
	var i, c;
	var at = dot = 0;
	var str = WsCheck;
	var sl  = str.length;
	var dx_at = dx_dot = -1;

	for (i = 0; i < sl; i++)
	{
		c = str.charAt(i);
		if (c == "@") {++at;  dx_at=i; }
		else if (c == ".") {++dot; dx_dot=i;}
		else if (c == " ")
		return false;
	}
	if ((sl < 8) || (dx_dot < 1) || (at != 1)
	|| (dx_at < 1) || (dx_dot-1 <= dx_at)
	|| (sl-3 < dx_dot))
	return false;
	else
	return true;
}
function Trim(TrimString)
{	var tempObj;
	if(TrimString && TrimString.value){ tempObj = TrimString;TrimString = tempObj.value;}
	if(TrimString == "undefined" || TrimString == null) return null;
	if(TrimString.length == 0 || TrimString.value == "" || TrimString == "")TrimString="";
	else
	{	var Lcont=0,TempStrArray=TrimString.split(" "),Rcont=TempStrArray.length-1;
		while(TempStrArray[Lcont] == "")Lcont++;while(TempStrArray[Rcont] == "")Rcont--;
		if(Rcont<Lcont)TrimString="";else
		for(TrimString = TempStrArray[Lcont], Lcont++ ; Lcont <= Rcont ; Lcont++) TrimString += " " + TempStrArray[Lcont];
		var re = /\'|/g;
		TrimString = TrimString.replace(re,"");
	}
	if(tempObj && TrimString != "undefined" && TrimString != null) 
	{	tempObj.value = TrimString;	return tempObj	  }
	else return TrimString;
}
function fnPlayFLV(Video, PUpW, PUpH)
{
	window.open('http://www.hmeproviders.com/tempsites/FLVVideos/'+Video,'Video', 'toolbar=0, scrollbars=no, status=0, location=0, resizable=0, menubar=0, width='+PUpW+', height='+PUpH+', left =50, top =50')
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  		window.open(theURL,winName,features);
	}