// JavaScript Document
function checkEmail(emailString) {
	splitVal = emailString.split('@');
	
	if(splitVal.length <= 1) {
		alert("Please enter a valid Email address");
		return false;
	}
	if(splitVal[0].length <= 0 || splitVal[1].length <= 0) {
		alert("Please enter a valid Email address");
		return false;
	}
	return true;
}
function checkvalue()
{
	if (document.contactusForm.txtname.value=="")
	{
		alert("Please enter your Name");
		document.contactusForm.txtname.focus();
		return false;
	}
if (document.contactusForm.txtmailid.value=="")
	{
		alert("Please enter your Email");
		document.contactusForm.txtmailid.focus();
		return false;
	}
	
	if(!checkEmail(document.contactusForm.txtmailid.value)) {
		document.contactusForm.txtmailid.select();
		document.contactusForm.txtmailid.focus();
		return false;
	}
	
	if (document.contactusForm.txtmessage.value=="")
	{
		alert("Please enter a Message");
		document.contactusForm.txtmessage.focus();
		return false;
	}
	
}




function enlargeImage(photoName) {
	sWidth = screen.availWidth;
	sHeight = screen.availHeight;
	
	winWidth = 720;
	winHeight = 530;
	
	sLeft = (sWidth - winWidth) / 2;
	sTop = (sHeight - winHeight) / 2;
	window.open("../php/imgEnlarge.php?photoName=" + photoName, "Cocohol", "width=" + winWidth + ",height=" + winHeight + ",top=" + sTop + ",left=" + sLeft + ",toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0");
	return;
}
function enlargeImage1(photoName) {
	sWidth = screen.availWidth;
	sHeight = screen.availHeight;
	
	winWidth = 270;
	winHeight = 370;
	
	sLeft = (sWidth - winWidth) / 2;
	sTop = (sHeight - winHeight) / 2;
	
	window.open("../php/imgEnlarge.php?photoName=" + photoName, "Cocoholimage", "width=" + winWidth + ",height=" + winHeight + ",top=" + sTop + ",left=" + sLeft + ",toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0");
	return;
}

// JavaScript Newsletter Document
function newsWindow() {
	sWidth = screen.availWidth;
	sHeight = screen.availHeight;
	
	winWidth = 400;
	winHeight = 300;
	
	sLeft = (sWidth - winWidth) / 2;
	sTop = (sHeight - winHeight) / 2;
	
	txtemail = document.newsLetter.txtemail.value;
	window.open("html/emailValidation.php?txtemail=" + txtemail , "cbsf", "width=" + winWidth + ",height=" + winHeight + ",top=" + sTop + ",left=" + sLeft + ",toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0");
	return;
}
 function closeWindow() {
	parent.window.opener.window.focus();
	parent.window.close();
}
function newsWindow1() {
	sWidth = screen.availWidth;
	sHeight = screen.availHeight;
	
	winWidth = 400;
	winHeight = 300;
	
	sLeft = (sWidth - winWidth) / 2;
	sTop = (sHeight - winHeight) / 2;
	
	txtemail = document.newsLetter.txtemail.value;
	window.open("emailValidation.php?txtemail=" + txtemail , "cbsf", "width=" + winWidth + ",height=" + winHeight + ",top=" + sTop + ",left=" + sLeft + ",toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0");
	return;
}