// JavaScript Document



wel="Welcome to websingold.com - Custom Websites at Affordable Prices!";
hom="Return to our Home Page!";
fav="Put us in your favorites for easy access later!";
tell="Tell your Friends and Family About websingold.com... They'll be glad you did!";
web="websingold.com - We build affordable, custom websites... Let us get started on yours!";
con="Feel free to Contact Us - We welcome all Questions, Comments and Suggestions!";
bak="Return to the Previous Page";

opt="Complete list of options and prices - yes prices";
ord="Order your custom built website from websingold.com";
ownsite="Now You Can Build Your Own Flash Website with the Desktop Flash Site Builder from websingold.com";
por="View examples of our work in the websingold.com portfolio";
tf="Build Your Own Flash Website! It\'s Easy! ORDER the Desktop Flash Site Builder TODAY!";
debt="Click now to visit this Debt Consolidation page";
wfh="Click now to visit this Work From Home site";
css="Click now to visit this Computer Services site";
easy="Click now to visit this 'Unsecured Credit Card' site";
elev="Click now to visit this 'Flash Elevator' page";
fta="Click now to visit this 'Air Brush Artwork' site";
shop="Click now to visit this 'Shopping Mall Entrance' page";
faqs="Have a question? The answer may be in our Frequently Asked Questions";
tel="Do a friend a favor... tell them about websingold.com";





// this function calls a popupWindow where
// win is the page address i.e. '../page.htm'
// and must be specified when the function is called

function popupWindow(win){
	
	newWindow = window.open(win,'newWin','toolbar=no,left=470,top=210,scrollbars=no,resizable=no,width=400,height=400');
	newWindow.focus();
}


// start slide show for portfolio

var slideimages=new Array()
var slidelinks=new Array()

function slideshowimages(){
  for (i=0;i<slideshowimages.arguments.length;i++){
  slideimages[i]=new Image()
  slideimages[i].src=slideshowimages.arguments[i]
  }
}

function slideshowlinks(){
  for (i=0;i<slideshowlinks.arguments.length;i++)
  slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
  if (!window.winslide||winslide.closed)
    winslide=window.open(slidelinks[whichlink])
  else
    winslide.location=slidelinks[whichlink]
    winslide.focus()
}


// end slide show for portfolio




function checkcontact ( contact )
{
    // ** START **
    if (contact.fname.value == "") {
        alert( "Please enter your First Name" );
        contact.fname.focus();
        return false ;
    }
    if (contact.lname.value == "") {
        alert( "Please enter your Last Name" );
        contact.lname.focus();
        return false ;
    }
    if (contact.email.value == "") {
        alert( "Please enter your Email Address" );
        contact.email.focus();
        return false ;
    }

    if (contact.comments.value == "") {
        alert( "Please enter your Comments" );
        contact.comments.focus();
        return false ;
    }

    // ** END **
	return true ;
}


function checkorder ( order )
{
    // ** START **
    if (order.fname.value == "") {
        alert( "Please enter your First Name" );
        order.fname.focus();
        return false ;
    }
    if (order.lname.value == "") {
        alert( "Please enter your Last Name" );
        order.lname.focus();
        return false ;
    }
    if (order.email.value == "") {
        alert( "Please enter your Email Address" );
        order.email.focus();
        return false ;
    }

    if (order.comments.value == "") {
        alert( "Please enter additional information about your website" );
        order.comments.focus();
        return false ;
    }

    // ** END **
	return true ;
}


function checkform ( tell )
{
    // ** START **
    if (tell.fname.value == "") {
        alert( "Please enter your Name" );
        tell.fname.focus();
        return false ;
    }
    if (tell.email.value == "") {
        alert( "Please enter your Email Address" );
        tell.email.focus();
        return false ;
    }
    if (tell.ffname.value == "") {
        alert( "Please enter your Friend\'s Name" );
        tell.ffname.focus();
        return false ;
    }
    if (tell.femail.value == "") {
        alert( "Please enter your Friend\'s Email" );
        tell.femail.focus();
        return false ;
    }

    if (tell.comments.value == "") {
        alert( "Please enter your Comments" );
        tell.comments.focus();
        return false ;
    }

    // ** END **
	return true ;
}


function checkfaq ( faqs )
{
    // ** START **
    if (faqs.fname.value == "") {
        alert( "Please enter your First Name" );
        faqs.fname.focus();
        return false ;
    }
    if (faqs.lname.value == "") {
        alert( "Please enter your Last Name" );
        faqs.lname.focus();
        return false ;
    }
    if (faqs.email.value == "") {
        alert( "Please enter your Email Address" );
        faqs.email.focus();
        return false ;
    }

    if (faqs.question.value == "") {
        alert( "Please enter your Question" );
        faqs.question.focus();
        return false ;
    }

    // ** END **
	return true ;
}




//roll over images
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}




function noRightClick() {
if (event.button==2) {
alert('Sorry! Right Click has been disabled\nFor information contact our webmaster by using the \'Contact Us\' page')
}
}
document.onmousedown=noRightClick



<!-- The Date -->
    month = new Array(12);
      month[0]="January"
      month[1]="February"
      month[2]="March"
      month[3]="April"
      month[4]="May"
      month[5]="June"
      month[6]="July"
      month[7]="August"
      month[8]="September"
      month[9]="October"
      month[10]="November"
      month[11]="December"

    day = new Array(7);
      day[0]="Sunday"
      day[1]="Monday"
      day[2]="Tuesday"
      day[3]="Wednesday"
      day[4]="Thursday"
      day[5]="Friday"
      day[6]="Saturday"

today=new Date();
dy=today.getDay();
date=today.getDate();
mo=today.getMonth();
yr=today.getFullYear();



function checkcontract ( contract )
{
    // ** START **
	
//Validates fname Textbox for an entry
if (contract.fname.value == "") {
        alert( "Please enter your First Name" );
        contract.fname.focus();
        return false ;
    }

//Validates lname Textbox for an entry
if (contract.lname.value == "") {
        alert( "Please enter your Last Name" );
        contract.lname.focus();
        return false ;
    }
	
//Validates street Textbox for an entry
if (contract.street.value == "") {
        alert( "Please enter your Street Address" );
        contract.street.focus();
        return false ;
    }

//Validates city Textbox for an entry
if (contract.city.value == "") {
        alert( "Please enter your City" );
        contract.city.focus();
        return false ;
    }

//Validates state Textbox for an entry
if (contract.st.value == "") {
        alert( "Please enter your State" );
        contract.st.focus();
        return false ;
    }

//Validates zip code Textbox for an entry
if (contract.zip.value == "") {
        alert( "Please enter your 5 Digit Zip Code" );
        contract.zip.focus();
        return false ;
    }

//Validates phone Textbox for an entry
if (contract.ph.value == "123-456-7890") {
        alert( "Please enter your Telephone Number\nIf you only have 1 phone enter it in both places." );
        contract.ph.focus();
        return false ;
    }
if (contract.ph.value == "") {
        alert( "Please enter your Telephone Number\nIf you only have 1 phone enter it in both places." );
        contract.ph.focus();
        return false ;
    }




//Validates cell phone Textbox for an entry
if (contract.cell.value == "123-456-7890") {
        alert( "Please enter your Cell Phone Number\nOr Repeat Phone Number Above" );
        contract.cell.focus();
        return false ;
    }
if (contract.cell.value == "") {
        alert( "Please enter your Cell Phone Number\nOr Repeat Phone Number Above" );
        contract.cell.focus();
        return false ;
    }


//Validates an Email Address Textbox
	if (contract.email.value == "")
	{
	    alert("Please enter your email address.");
		contract.email.focus();
		return (false);
	}			
 			
	var teststr = (contract.email.value);
  	var iserr=false;
	if (!teststr=='')
	{ 
	  // there must be >= 1 character before @, so we
	  // start looking at character position 1 
	  // (i.e. second character)
	var i = 1;
	var sLength = teststr.length;
	  // look for @
	while ((i < sLength) && (teststr.charAt(i) != "@"))
	{ 
	i++;
	}
	if ((i >= sLength) || (teststr.charAt(i) != "@")) 
	{
	iserr=true;
	}
		else 
		{
		 i += 2;
		 // look for "."
		 while ((i < sLength) && (teststr.charAt(i) != "."))
			 { 
				i++;
			 }
		 // there must be at least one character after the "."
		 if ((i >= sLength - 1) || (teststr.charAt(i) != ".")) 
		 	{
			iserr = true;
			}
		}
   }
	   if (iserr)
		 {
		  alert('Please enter a valid email address.');
		  contract.email.focus();
   	      return (false);				  
	     }

//Validates domain Textbox for an entry
if (contract.domain.value == "") {
        alert( "Please enter your Domain Name\nOr Enter 'N/A'" );
        contract.domain.focus();
        return false ;
    }

//Validates terms Textbox for an entry
if (!document.contract.terms.checked) {
        alert( "You Must Read and Agree to the Terms and Conditions" );
        contract.terms.focus();
        return false ;
    }

//Validates signature Textbox for an entry
if (!document.contract.signature.checked) {
        alert( "You Must Agree to, and Sign the Contract/Agreement\nChecking this box represents your Signature and is Legally Binding" );
        contract.signature.focus();
        return false ;
    }




//Validates question Textbox for an entry
//    if (contract.question.value == "") {
//        alert( "Please enter your Comments" );
//        contract.question.focus();
//        return false ;
//    }

    // ** END **
	return true ;
}


