

/* Sub Window Script */

function openW(dest,winName,theWidth,theHeight) {newWin = window.open("" + dest, winName, "width=" + theWidth + ",height=" + theHeight + ",top=0,left=0,menubar=no,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,resizable=yes");}

function openWn(dest,winName,theWidth,theHeight) {newWin = window.open("" + dest, winName, "width=" + theWidth + ",height=" + theHeight + ",top=0,left=0,menubar=no,toolbar=no,location=no,directories=no,scrollbars=no,status=no,resizable=no");}

function openS(dest,winName,theWidth,theHeight) {newWin = window.open("" + dest, winName, "width=" + theWidth + ",height=" + theHeight + ",top=0,left=0,menubar=no,toolbar=no,location=no,directories=no,scrollbars=no,status=no,resizable=yes");}

function openP(dest,winName,theWidth,theHeight) {newWin = window.open("" + dest, winName, "width=" + theWidth + ",height=" + theHeight + ",top=0,left=0,menubar=no,toolbar=no,location=no,directories=no,scrollbars=no,status=no,resizable=yes");}


	
/* Form Script */

function checkmail()
{
	var form=window.document.forms(0);
	var field=form.elements(0);
	var i=0;
	var j=0;
	var str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var strchr = "!#$%^&*()=+''?><{}[]|\/:;~` "
	var strat = "@";
	var strdot = ".";
	var flag = 0;	
	var countat = 0;
	var countdt = 0;
			
	if (field.value.length < 6)
	{
		flc=1;
		alert("Not a Valid E-mail Address");
		field.focus();
		field.value="";
		return false;
	}
	else 
	{
		flag = 0;
			
		for(i=0; i<=field.value.length-1; i++)
		{
			if(field.value.substring(i,i+1) == strat)
			{						
				flag = 1;
				break;	
			}
			countat = countat +1;
		}
			
		if (flag == 0 ) 
		{
			flc=1;
			alert("Not a Vaild E-mail Address");
			field.focus();		
			field.value="";
			return false;		
		}
		else
		{
			flag = 0;
		
			for(i=0; i<=field.value.length-1; i++)
			{
				if(field.value.substring(i,i+1) == strdot)
				{
					flag = 1;
					break;	
				}
			countdt = countdt + 1;
			}
			
			if (flag == 0 ) 
			{
				flc=1;
				alert("Not a Vaild E-mail Address");
				field.focus();
				field.value="";
				return false;			
			}
			else if (countdt == field.value.length - 1)
			{
				flc=1;
				alert("Not a Vaild E-mail Address");
				field.focus();
				field.value="";
				return false;
			}
			else if (countat == countdt-1)
			{
				flc=1;
				alert("Not a Valid E-mail Address VERY NEXT");
				field.focus();
				field.value="";
				return false;
			}
			else 
			{					
				for (i=0; i<field.value.length; i++)
				{
					for (j=0; j<strchr.length-1; j++)
					{
						if (field.value.substring(i,i+1) == strchr.substring(j,j+1))
						{					
							flc=1;
							alert("Not a valid character " + strchr.substring(j,j+1));
							field.focus();
							field.value="";
							return false;
							break;
						}
					}
				}
			}																	
		}							
	}
	return true;
}













var alreadysubmitted = false;
var isNS6=((navigator.userAgent.toLowerCase().indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=5));
var isNS4=(document.layers)?1:0;
var isIE4=(document.all)?1:0;
var isMAC=(navigator.appVersion.indexOf("Macintosh") > -1);
var isLinux=(navigator.appVersion.toUpperCase().indexOf("LINUX") > -1);
var quesNum = 0;
var notClicked = false;

function check() {
var OValue = "";
if (alreadysubmitted) return false;

// Make sure the comment is not longer than 1000 chars
if (document.Comments.value.length>1000) {
document.Comments.select();
document.Comments.focus();
alert('Comments may not exceed 1000 characters. Please adjust and resubmit.');
return false;
	}

// Checking the OverAll Rating

for (i=0; i<5; i++) {
if (document.overall[i].checked=="1") {
OValue=document.overall[i].value;
}
}
if (OValue =="") {	
alert('Please choose an overall rating before submitting.');
return false;
} else {

// Make the comment blank is not modified
if(!notClicked)document.Comments.value='';
alreadysubmitted = true;		
return true;
}
}






// hidden description

function searchtop(){
document.write("Delite to the last bite .....Visit Mulholland Citrus today!")
}


if(top != self) {
	top.location = location
}

function searchbottom(){
document.write("Delite to the last bite .....Visit Mulholland Citrus today!")
}


if(top != self) {
	top.location = location
}


// copyright

function copyright(){
wriYr = new Date
var doYr = wriYr.getFullYear()
document.write("&nbsp;Copyright &#169 1999 - " + doYr + " &nbsp;~ Mulholland Citrus&nbsp;~ All Rights Reserved ")
}

/* Sierra design Script */

function sd(){
document.write("&nbsp;Website Assistance provided by Sierra design")
}


/* Dont take my code Script */

if(top != self) {
	top.location = location
}





// Form validate

function checkform ( form )
{
// 
  if (form.My_name_is.value == "") {
    alert( "Please enter your name." );
    form.My_name_is.focus();
    return false ;
  }

  if (form.My_email_address_is.value == "") {
    alert( "Please enter your email address." );
    form.My_email_address_is.focus();
    return false ;
  }
  if (form.The_name_of_my_organization_is.value == "") {
    alert( "Please enter your organization or company name." );
    form.The_name_of_my_organization_is.focus();
    return false ;
  }

// 
  return true ;
}
