//TEST
function test1()
{
	alert('test1');
}

function open_window(strName, strHeight, strWidth)
{
	window.open(strName, null, 'height=' + strHeight + ',width=' + strWidth + ',status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');
}



//SHOW\HIDE
function showHide(clientId)
{
    //alert(clientId);		
    //alert(document.getElementById(clientId));
	if (document.getElementById(clientId).style.display == 'none')
	{
	    document.getElementById(clientId).style.display = '';
	}
	else 
	{
		document.getElementById(clientId).style.display = 'none';
	}
} 

//CHECK IF STRING IS AN EMAIL
function isEmail(str) 
{
// are regular expressions supported?
	var supported = 0;
	if (window.RegExp) 
	{
  		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) {supported = 1;}
	}
	if (!supported)
	{ 
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	}
	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$");
	
	return (!r1.test(str) && r2.test(str));
}

function CheckLen(Obj,MaxLen)
{
	//alert(Obj.value.length)
	if (Obj.value.length>MaxLen)
		Obj.value=Obj.value.substring(0, MaxLen-1);
}

function PrintPage()
{
	//if(PrintPage )
	//PrintPage.close();
	PrintPage = window.open('Print.asp','','width=776,height=350,scrollbars=1,left=0,top=0,resizable=1');
	PrintPage.focus();
}

