function disable()
{
if (event.button == 2)
{
alert("Sorry no rightclick on this page.")
}
}

function openAd(adsrc)
{
adsrc="ads.asp?src=" + adsrc
window.open(adsrc,"adwindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=500")
}

function openImg(src)
{
src="images/portfolioImg/" + src
window.open(src,"imgwindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=400")
}


function openPhoto(src)
{
newsrc="Photo.asp?img="+ src;

window.open(newsrc,"photowindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=4500")
}

function openJob(jobID,name)
{
newsrc="jobDetails.asp?id="+ jobID +"&business="+name;

window.open(newsrc,"jobwindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=500,left=200, top=200")
}

function openGalPhoto(src,folder)
{
newsrc="photo.asp?img="+ src +"&folder="+folder;
window.open(newsrc,"photowindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=500")
}



function setNavLoc()
{
	var loc
	loc=document.title
	document.all.item("navLoc").innerHTML="Your Location | " + loc;
	
}
function butSelected(b)
{
	var butName
	butName=b.name
	doSelected(b)

}
function doSelected(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="selected"
	
	var h=document.all.item(butName).href
	var	location="_parent"
	window.open(h,location)
	
}
function showMouseOver(b)
{
	var butName
	butName=b.name
	document.all.item(butName).className="mouseOver"
	
}
function showMouseOver2(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="mouseOver2"
	
}
function showMouseOver3(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="mouseOver3"
	
}
function showMouseLeave(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="button"
	
}
function showMouseLeave2(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="button2"
	
}
function showMouseLeave3(b)
{
	
	var butName
	butName=b.name
	document.all.item(butName).className="button3"
	
}

function showMouseFocus3(b){
	alert("Focus")
	var butName
	butName=b.name
	document.all.item(butName).className="button3"
}




function isFilled(element)
		{
	   	if(element.value == "" || element.value == null)return false;
	  	else return true;
		}
	 
function isReady(form)
		{
		if (isFilled(form.mainSearchbox) == false)
			{
	  		alert("Please enter a search value");
	 		form.mainSearchbox.focus();
	  		return false;
			history.back()  		
			}
		return true;
		}
	
	function isFilled2(element)
		{
	   	if(element.value == "" || element.value == null)return false;
	  	else return true;
		}
	 
	function isEmail2(element)
		{
	     	if (!isFilled(element))
		 	return true;
	 	if (element.value.indexOf("@") != "-1" &&
	 	     element.value.indexOf(".") != "-1" &&
	 		 element.value != "")
	 		 return true;
	 	 else return false;
		}
	 
	 function isReady2(form)
		{
		
		if (isFilled2(form.custid) == false)
			{
	  		alert("Please enter a customer id.");
	 		form.custid.focus();
	  		return false;
	  		}
	  	if ((form.custid.value).indexOf(' ')>-1)
			{
	  		alert("Please enter a valid customer id (with no spaces).");
	 		form.custid.focus();
	  		return false;
	  		}	
	  	if ((form.custid.value.length) >10)
	  		{
	  		alert("Please enter a customer id between 5 and 10 characters");
	  		form.custid.focus();
	  		return false;
	  		}
	  	if ((form.custid.value.length) <5)
	  		{
	  		alert("Please enter a customer id between 5 and 10 characters");
	  		form.custid.focus();
	  		return false;
	  		}	
	  	if (isFilled2(form.cword) == false)
			{
	  		alert("Please enter a password.");
	 		form.cword.focus();
	  		return false;
	  		}
	  	if ((form.cword.value).indexOf(' ')>-1)
			{
	  		alert("Please enter a valid password (with no spaces).");
	 		form.cword.focus();
	  		return false;
	  		}	
	  	if ((form.cword.value.length) <5)
	  		{
	  		alert("Please enter a password more than 4 characters");
	  		form.cword.focus();
	  		return false;
	  		}
	  	 	if (form.cword.value!=form.vword.value)
			{
	  		alert("Passwords differ, please type passswords that are identical !");
	 		form.cword.focus();
	  		return false;
	  		}			
	  	if (isEmail2(form.email) == false || form.email.value=='')
			{
	  		alert("Please enter a correct email address.");
	 		form.email.focus();
	  		return false;
	  		}
	  	if ((form.email.value).indexOf(' ')>-1)
			{
	  		alert("Please enter a valid email address (with no spaces).");
	 		form.email.focus();
	  		return false;
	  		}
	  	
	  	if(isFilled2(form.forename) == false)
			{
	  		alert("Please enter your Forename");
	  		form.forename.focus();
	  		return false;
	  		}
	  	if(isFilled2(form.surname) == false)
			{
	  		alert("Please enter your Surname");
	  		form.surname.focus();
	  		return false;
	  		}
	  	if(isFilled2(form.age) == false)
			{
	  		alert("Please enter your Age");
	  		form.age.focus();
	  		return false;
	  		}
		return true;
		}

function isReadyUpdate(form)
		{
		
		if (isFilled2(form.cword) == false)
			{
	  		alert("Please enter a password.");
	 		form.cword.focus();
	  		return false;
	  		}
	  	if ((form.cword.value).indexOf(' ')>-1)
			{
	  		alert("Please enter a valid password (with no spaces).");
	 		form.cword.focus();
	  		return false;
	  		}	
	  	if ((form.cword.value.length) <5)
	  		{
	  		alert("Please enter a password more than 4 characters");
	  		form.cword.focus();
	  		return false;
	  		}
	  	 	if (form.cword.value!=form.vword.value)
			{
	  		alert("Passwords differ, please type passswords that are identical !");
	 		form.cword.focus();
	  		return false;
	  		}			
	  	if (isEmail2(form.email) == false || form.email.value=='')
			{
	  		alert("Please enter a correct email address.");
	 		form.email.focus();
	  		return false;
	  		}
	  	if ((form.email.value).indexOf(' ')>-1)
			{
	  		alert("Please enter a valid email address (with no spaces).");
	 		form.email.focus();
	  		return false;
	  		}
	  	
	  	if(isFilled2(form.forename) == false)
			{
	  		alert("Please enter your Forename");
	  		form.forename.focus();
	  		return false;
	  		}
	  	if(isFilled2(form.surname) == false)
			{
	  		alert("Please enter your Surname");
	  		form.surname.focus();
	  		return false;
	  		}
	  	if(isFilled2(form.age) == false)
			{
	  		alert("Please enter your Age");
	  		form.age.focus();
	  		return false;
	  		}
		return true;
		}

function validSearch(theForm)
{
  
  if (theForm.mainSearchbox.value == "")
  {
    alert("Please enter a value for the \"Search\" field.");
    theForm.mainSearchbox.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789- \t\r\n\f";
  var checkStr = theForm.mainSearchbox.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the \"Search\" field.");
    theForm.mainSearchbox.focus();
    return (false);
  }
  return (true);
}


function submitValidator() { 
return confirm('Submit it?'); 
} 

