function OpenWindow(url)
{
	window.open(url, "pop", "width=600, height=500, scrollbars=no")
}

function OpenWindowTwo(url)
{
	window.open(url, "pop", "width=550, height=500, scrollbars=yes")
}

function CheckContactUs()
{
	var xReturn = false;
	var at = frmContact.txtEmail.value.indexOf("@");
	var dot = frmContact.txtEmail.value.indexOf(".");

	if (frmContact.txtName.value.length < 2)
	{
		alert("Please enter your name");
		frmContact.txtName.focus();
	}
	else if ((frmContact.txtEmail.value.length < 5) || (at==-1) || (dot==-1)) 
	{
		alert("Please enter your email address");
		frmContact.txtEmail.focus();		
	}
	else if (frmContact.txtSubject.value.length < 2)  
	{
		alert("Please enter the subject");
		frmContact.txtSubject.focus();		
	}
	else if (frmContact.txtMessage.value.length < 10)  
	{
		alert("Please enter the email message");
		frmContact.txtMessage.focus();		
	}
	else xReturn = true;
	
	if (!xReturn) 
	{ 
		frmContact.strSubmit.disabled = false;
	}
	else
	{ 
		frmContact.strSubmit.disabled = true;
	}
	
	return xReturn;
}

function CheckInvoiceRequest()
{
	var xReturn = false;
	var at = frmInvoice.txtEmail.value.indexOf("@");
	var dot = frmInvoice.txtEmail.value.indexOf(".");

	if (frmInvoice.txtParty.value.length < 2)
	{
		alert("Please enter the WEDDING/EVENT PARTY");
		frmInvoice.txtParty.focus();
	}
	else if (frmInvoice.txtDate.value.length < 2)
	{
		alert("Please enter the WEDDING/EVENT DATE");
		frmInvoice.txtDate.focus();
	}
	else if (frmInvoice.txtName.value.length < 2)
	{
		alert("Please enter YOUR FULL NAME");
		frmInvoice.txtName.focus();
	}
	else if ((frmInvoice.txtEmail.value.length < 5) || (at==-1) || (dot==-1)) 
	{
		alert("Please enter your EMAIL ADDRESS");
		frmInvoice.txtEmail.focus();		
	}
	else if (frmInvoice.txtSubject.value.length < 2)  
	{
		alert("Please enter the SUBJECT");
		frmInvoice.txtSubject.focus();		
	}
	else if (frmInvoice.txtMessage.value.length < 10)  
	{
		alert("Please enter the email MESSAGE");
		frmInvoice.txtMessage.focus();		
	}
	else xReturn = true;
	
	if (!xReturn) 
	{ 
		frmInvoice.strSubmit.disabled = false;
	}
	else
	{ 
		frmInvoice.strSubmit.disabled = true;
	}
	return xReturn;
}

function ShowInfo(xMe)
{
	var intLeft = event.clientX;
	var intTop = event.clientY;
	//imgPicture.src=urlPic;
	if (intLeft > 500) intLeft = intLeft - divDisplay.clientWidth;
	if (intTop > 230) intTop = intTop - divDisplay.clientHeight;   
	divDisplay.style.pixelLeft=intLeft + document.body.scrollLeft;
	divDisplay.style.pixelTop=intTop + document.body.scrollTop;
	divDisplay.style.visibility="visible";
	
	var xxMe = eval(xMe)
	divDisplay.innerHTML = xxMe.name;
	divDisplay.style.margin=4;
	divDisplay.style.padding=4;
	divDisplay.style.backgroundColor="#FFFFE6";
	divDisplay.style.visibility="visible";
}


function HideInfo()
{
	divDisplay.innerHTML = "";
	divDisplay.style.visibility="hidden";
}
