<!--//

// Quick Contact Form Start
function clearText(thefield) {
	if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 

function replaceText(thefield) {
	if (thefield.value=="") { thefield.value = thefield.defaultValue }
}
// Quick Contact Form End


// Form Validation Start
function Validate(){
	var bitErr = false;
	var bitErrEmail = false;
	var reqField = "";
 
	if (document.contact_main.Name.value == ""){ bitErr = true; reqField += "- Name\n";}
	if (document.contact_main.Address.value == "") { bitErr = true; reqField += "- Address\n"; }
	if (document.contact_main.Phone.value == "") { bitErr = true; reqField += "- Phone\n"; }
	if (document.contact_main.Email.value == " email") { bitErr = true; bitErrEmail = true; }
	if (document.contact_main.Email.value.indexOf("@") == -1) { bitErr = true; bitErrEmail = true; }
	if (document.contact_main.Email.value.indexOf(".") == -1) { bitErr = true; bitErrEmail = true; }
	
	if (bitErrEmail){
		reqField += "- Email (Use a valid email address.)\n";
	}
	if (bitErr){
		alert("Please fill out the following required information:\n"+reqField);
		return false;
	}
	
	document.contact_main.submit();
}
// Form Validation End



// Form Validation Start
function Validate2(){
 var bitErr = false;

 if (document.registrationForm.Wedding_Date.value == "") bitErr = true; 
 if (document.registrationForm.Groom_Name.value == "") bitErr = true; 
 if (document.registrationForm.Bride_Name.value == "") bitErr = true; 
 if (document.registrationForm.Groom_Email.value == "") bitErr = true; 
 if (document.registrationForm.Groom_Email.value.indexOf("@") == -1) bitErr = true;
 if (document.registrationForm.Groom_Email.value.indexOf(".") == -1) bitErr = true;
 if (document.registrationForm.Groom_Phone.value == "") bitErr = true; 
  
 if (bitErr){
  alert("Please fill up all the necessary information\nand check for the correctness of your entries.\nPlease use a valid email address.");
  return false;
 }
 
 document.registrationForm.submit();
}

// Form Validation End

// Form Validation Start
function Validate3(){
 var bitErr = false;

 if (document.application.Business_Name.value == "") bitErr = true; 
 if (document.application.Name.value == "") bitErr = true; 
 if (document.application.Email.value.indexOf("@") == -1) bitErr = true;
  
 if (bitErr){
  alert("Please fill up all the necessary information\nand check for the correctness of your entries.\nPlease use a valid email address.");
  return false;
 }
 
 document.application.submit();
}

// Form Validation End


// Bookmark Site Start
function bookmarksite(bookmarktitle, bookmarkurl){
	if (document.all)
	window.external.AddFavorite(bookmarkurl, bookmarktitle);
	else if (window.sidebar)
	window.sidebar.addPanel(bookmarktitle, bookmarkurl, "")
}
// Bookmark Site End


//Vertical Sucker Sprite Start
/*
vsfHover = function() {
	var vsfEls = document.getElementById("v-suckersprite").getElementsByTagName("LI");
	for (var i=0; i<vsfEls.length; i++) {
		vsfEls[i].onmouseover=function() {
			this.className+=" vsfhover";
		}
		vsfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" vsfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", vsfHover);
*/
//Vertical Sucker Sprite End


//Horizontal Sucker Sprite Start
/*
hsfHover = function() {
	var hsfEls = document.getElementById("h-suckersprite1").getElementsByTagName("LI");
	for (var i=0; i<hsfEls.length; i++) {
		hsfEls[i].onmouseover=function() {
			this.className+=" hsfhover";
		}
		hsfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hsfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", hsfHover);
*/
//Horizontal Sucker Sprite End


// Disable Forms Start
function init()
{
	if (!document.layers) return;
	var box = document.forms[0].elements;
	for (var i=0;i<box.length;i++)
	{
		box[i].disabled = false;
	}
}

function disableIt(obj)
{
	obj.disabled = !(obj.disabled);
	var z = (obj.disabled) ? 'disabled' : 'enabled';
	if(z == 'disabled') obj.style.backgroundColor='#c0c0c0'; else obj.style.backgroundColor='#fff';
}

function extracheck(obj)
{
	return !obj.disabled;
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

// Disable Forms End

<!--//
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}