// Script for copy right year
var copyrightyear = "&copy; 2008,"
function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=600,left = 262,top = 134');");

}

function WinExec(url,name,x,y,z) 
{
	var posX = (screen.width/2)-(x/2);
	var posY = (screen.height/2)-(y/2);
	var winPref = "width=" + x + ",height=" + y
		+ ",innerWidth=" + x + ",innerHeight=" + y
		+ ",left=" + posX + ",top=" + posY
		+ ",screenX=" + posX + ",screenY=" + posY
		+ ",toolbar=" + z + ",location=0,directories=0,status=" + z
		+ ",menubar=" + z + ",scrollbars=1,resizable=0,width=" + x
		+ ",height=" + y;
	var remoteWin = null;     
	remoteWin = window.open(url,name,winPref);
	if (window.focus) 
	{         
		remoteWin.focus();     
	} 
}   
//
	function chkValid(telno)
	{
		var stripped = telno.replace(/[\(\)\.\-\ ]/g, '');
		if (isNaN(parseInt(stripped))) {
		   return false;
		}
		return true;
	}
		function deleteblanks(entry)
		{
			var len = entry.length ;
			var foundBlank = 1;
			while(foundBlank == 1 && len > 0)
			{
				var indx = entry.indexOf(" ");
				if(indx == -1) { foundBlank = 0 ;}
				else
				{
					entry = entry.substring(0,indx) + entry.substring(indx+1,len);
				}
				len = entry.length;
			}
			return entry;
		}
		function tl1validate()
		{
			if (deleteblanks(document.ProductSubmissionForm.userName.value) == "")
			{
				alert("Please enter your name");
				document.ProductSubmissionForm.userName.focus();
				return false;
			}
			if (deleteblanks(document.ProductSubmissionForm.emailID.value) == "")
			{
				alert("Please enter your Email Id");
				document.ProductSubmissionForm.emailID.focus();
				return false;
			}
			if (document.ProductSubmissionForm.emailID.value.indexOf('@') == -1)
			{
				alert("Invalid email Address");
				document.ProductSubmissionForm.emailID.focus();
				return false;
			}
			if (deleteblanks(document.ProductSubmissionForm.tel.value) == "")
			{
				alert("Please enter your Telephone No");
				document.ProductSubmissionForm.tel.focus();
				return false;
			}
			if (!chkValid(document.ProductSubmissionForm.tel.value))
			{
				alert("Invalid Telephone No");
				document.ProductSubmissionForm.tel.select();
				return false;
			}
 		    if (deleteblanks(document.ProductSubmissionForm.companyName.value) == "")
			{
				alert("Please enter Company or Organization name");
				document.ProductSubmissionForm.companyName.focus();
				return false;
			}			
		}		

  