function popup(fil,wid,hei,scr)
{
	var windowAttributes;
	var winWidth = wid;
	var winHeight = hei;
	var leftPos,rightPos;
	leftPos = (screen.width/2) - (winWidth / 2);
	rightPos = (screen.height/2) - (winHeight / 2);
	windowAttributes = "width="+winWidth+",height="+winHeight+",toolbar=no,left="+leftPos+",top="+rightPos+",location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no";
   	var courseWindow = open(fil,"",windowAttributes);
}

function validname()
{
var nodetail = true;
var mess = "Please enter the following details:\n\n";
if(trimall(this.form1.gvname.value)=="")
{
	mess += "  Invoice First name\n";
	nodetail = false;
}
if(trimall(this.form1.gvpass.value)=="")
{
	mess += "  Invoice Last name\n";
	nodetail = false;
}
if (nodetail==false)
{
	alert(mess);
	return nodetail;
}
}

function trimall(sString)
{
while (sString.substring(0,1) == ' ')
{
sString = sString.substring(1, sString.length);
}
while (sString.substring(sString.length-1, sString.length) == ' ')
{
sString = sString.substring(0,sString.length-1);
}
return sString;
}

function copyadd()
{
if(this.form1.chk1.checked == true)
{
	form1.FSdfname.value = form1.FSfname.value;
	form1.FSdsname.value = form1.FSsname.value;
	form1.FSdadd1.value = form1.FSadd1.value;
	form1.FSdadd2.value = form1.FSadd2.value;
	form1.FSdadd3.value = form1.FSadd3.value;
	form1.FSdadd4.value = form1.FSadd4.value;
	form1.FSdadd4.value = form1.FSadd4.value;
	form1.FSdcountry.value = form1.FScountry.value;
	form1.FSdph.value = form1.FSph.value;
}
}
