<!--
var MyForm;
var g_InSubmitProccess=false;
window.document.write("<DIV id=\"g_WaitMessage\" style=\"BORDER-RIGHT: 2px double;DISPLAY: none; BORDER-TOP: 2px double;LEFT: 0px; VERTICAL-ALIGN: super; BORDER-LEFT: 2px double; WIDTH: 300px; BORDER-BOTTOM: 2px double; POSITION: absolute; TOP:0px; HEIGHT: 150px; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: center\"><STRONG><FONT color=\"#cc0000\"><TABLE id=\"Table2\" height=\"100%\" cellSpacing=\"1\" cellPadding=\"1\" width=\"100%\" border=\"0\"><TR><TD></TD></TR><TR><TD align=\"center\" height=\"100%\"><STRONG><FONT color=\"#cc0000\"><FONT size=\"4\">In process&nbsp;please wait...</FONT>&nbsp;</FONT></STRONG></TD></TR><TR><TD></TD></TR></TABLE></FONT></STRONG></DIV>");

function DoFormSubmit()
{	
	if(g_InSubmitProccess==true) return false;
	
	g_InSubmitProccess=true;
	var w=300,h=150,l=50,t=50;	
	if(window.document.body.clientWidth/2 < w)w=window.document.body.clientWidth/2;
	if(window.document.body.clientHeight/2 < h)h=window.document.body.clientHeight/2;
	l=window.document.body.clientWidth/2-w/2;
	t=window.document.body.clientHeight/2-h/2;
	g_WaitMessage.style['width']='' + w + 'px';
	g_WaitMessage.style['height']='' +h + 'px';
	g_WaitMessage.style['top']='' + t + 'px';
	g_WaitMessage.style['left']='' + l + 'px';	
	g_WaitMessage.style['display']='';		
	return true;
		
}
function RunOpenerSubmit()
{
	//MyForm.onsubmit();
	if(g_InSubmitProccess==false)
	{
		DoFormSubmit();
		MyForm.submit();
	}
	else
		return false;
}
function DoUnload()
{	
	return true;
}

function ShowHide(ctl,pnl)
{			
	ctl.value=((ctl.value*1 + 1)-2)*(-1); 
	if(ctl.value==1) 
		{pnl.style.display='';} 
	else 
		{pnl.style.display='none';} 

}	
			
function formatAsMoney(mnt) 
{
	if (mnt=="") return "";
	mnt -= 0;
	mnt = (Math.round(mnt*100))/100;
	return (mnt == Math.floor(mnt)) ? mnt + '.00' 
        : ( (mnt*10 == Math.floor(mnt*10)) ? mnt + '0' : mnt);
}

function OpenCalender(FormName)
{		
	w = 201;
	h = 181;
	
	strURL = "../Common/Cal.aspx?Submit=N&formname=" + FormName;
	
	lPos = window.screenLeft+window.event.x;
    rPos = window.screenTop+window.event.y;
	
	var strFeatures = "scrollbars=no,resizable=no,width=" + w + ",height=" + h + ",top=" + rPos + ",left=" + lPos;
	window.open(strURL, 'calendar_window', strFeatures);	
}
function OpenCalenderS(FormName)
{		
	w = 201;
	h = 181;
	
	strURL = "../Common/Cal.aspx?Submit=Y&formname=" + FormName;
	
	lPos = window.screenLeft+window.event.x;
    rPos = window.screenTop+window.event.y;

	var strFeatures = "scrollbars=no,resizable=no,width=" + w + ",height=" + h + ",top=" + rPos + ",left=" + lPos;
	window.open(strURL, 'calendar_window', strFeatures);
}

function OpenHours(FormName,sd,dt)
{		
	w = 200;
	h = 181;
	
	strURL = "../Common/AddHours.aspx?formname=" + FormName + "&sname=" + sd + "&date=" + dt;
	
	lPos = window.screenLeft+window.event.x;
    rPos = window.screenTop+window.event.y;

	var strFeatures = "scrollbars=no,resizable=no,width=" + w + ",height=" + h + ",top=" + rPos + ",left=" + lPos;
	window.open(strURL, 'AddHours_window', strFeatures);
}
function DoPrecent(price,count,prec,tot)
{
	var d;
	tot.value=price.value*count.value*prec.value - (price.value*count.value*prec.value)/100 
}

function Round(n,l)
{
	var p=Math.floor(n);
	var v=n-p;
	v=v*Math.pow(10,l);
	v=Math.round(v);
	v=v/Math.pow(10,l);
	return p+v;				
}

function SetForm()
{
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
		MyForm = document.forms["Form1"];
	}	
	else {
		MyForm = document.Form1;
	}
	if(MyForm==null)
	{
	    if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    		MyForm = document.forms["form1"];
    	}	
    	else {
		    MyForm = document.form1;
	    }   
	}
	if(MyForm==null)
	{
	    if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    		MyForm = document.forms["aspnetForm"];    		                         
    	}	
    	else {
		    MyForm = document.aspnetForm;
	    }   
	}
}
//-->


