

PositionX = 1;
PositionY = 1;

defaultWidth  = 300;
defaultHeight = 200;


var AutoClose = true;


if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=300,height=200,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){








writeln('<html><head><title>Loading image...</title><meta http-equiv="imagetoolbar" content="no"><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var message=""; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false")// -->');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(250,250);');
writeln('width=250-(document.body.clientWidth-document.images[0].width);');
writeln('height=250-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["r"].width;');writeln('window.innerHeight=document.images["r"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=FCB568 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=E7E7E7 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="r" src='+imageURL+' style="display:block" onclick=javascript:window.close()></body></html>');
close();		
}}

function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}




function emPG()
	{
	(document.location='mailto:?subject=allclasslimo.com.au&body=Check this link out from the All Class Limousines web site: '+document.location)
		}


function addBM()
	{
	bookmarkurl="http://www.allclasslimo.com.au"
	bookmarktitle="All Class Limousines - 'we aim to please'"
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle)
		}


function adet()
	{	
		if (document.getElementById("wsadet").value == "eg: 22 Johnson St, Perth WA 6000")
		{
			document.getElementById("wsadet").value='';
		}
	}

function adeti()
	{	
		if (document.getElementById("wsadeti").value == "eg: 22 Johnson St, Perth WA 6000")
		{
			document.getElementById("wsadeti").value='';
		}
	}


function adetii()
	{	
		if (document.getElementById("wsadetii").value == "eg: ABC Photos, 22 Johnson St, Perth WA 6000")
		{
			document.getElementById("wsadetii").value='';
		}
	}


function adetiii()
	{	
		if (document.getElementById("wsadetiii").value == "eg: Ribbon colours, teddy bears etc..")
		{
			document.getElementById("wsadetiii").value='';
		}
	}









function notValidEmail( str ){
    mailRE = new RegExp( );
    mailRE.compile( '^[._a-z0-9-]+@[.a-z0-9-]+[.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
}





function validateGENform(GENform) {

	
	if (GENform.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}

	if( notValidEmail( GENform.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}

	if (GENform.phone.value == "") {
	alert("Please enter your phone or mobile number.") ;
	return false ;
	}

	if (GENform.company.value == "") {
	alert("Please enter your business/company name.") ;
	return false ;
	}

	if (GENform.message.value == "") {
	alert("Please enter your general enquiry message.") ;
	return false ;
	}

	var iSelect = GENform.led_by.options
	[GENform.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how you heard about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}







function validateGENBOOKform(GENBOOKform) {

	
	if (GENBOOKform.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}

	if (GENBOOKform.address.value == "") {
	alert("Please enter your pickup address.") ;
	return false ;
	}

	if (GENBOOKform.day.value == "") {
	alert("Please enter the day of your pickup.") ;
	return false ;
	}

	if (GENBOOKform.month.value == "") {
	alert("Please enter the month of your pickup.") ;
	return false ;
	}

	if (GENBOOKform.year.value == "") {
	alert("Please enter the year of your pickup.") ;
	return false ;
	}

	if (GENBOOKform.time.value == "") {
	alert("Please enter the pickup time correctly.") ;
	return false ;
	}

	if (GENBOOKform.ampm.value == "") {
	alert("Please enter the pickup time correctly.") ;
	return false ;
	}

	if (GENBOOKform.contact_number.value == "") {
	alert("Please enter your phone or mobile number.") ;
	return false ;
	}

	if( notValidEmail( GENBOOKform.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}

	var iSelect = GENBOOKform.vehicle.options
	[GENBOOKform.vehicle.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise us of your preferred vehicle.") ;
	return false ;
	}

	var iSelect = GENBOOKform.hoursrequired.options
	[GENBOOKform.hoursrequired.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please let us know approx how many hours you require our service.") ;
	return false ;
	}


	if (GENBOOKform.tripplans.value == "") {
	alert("Please tell us your destination plans.") ;
	return false ;
	}

	var iSelect = GENBOOKform.led_by.options
	[GENBOOKform.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how you heard about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}









function validateWEDBOOKform(WEDBOOKform) {

	
	if (WEDBOOKform.groomname.value == "") {
	alert("Please enter the name of the groom.") ;
	return false ;
	}

	if (WEDBOOKform.bridename.value == "") {
	alert("Please enter the name of the bride.") ;
	return false ;
	}

	if (WEDBOOKform.contact_number.value == "") {
	alert("Please enter your phone or mobile number.") ;
	return false ;
	}

	if( notValidEmail( WEDBOOKform.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}

	if (WEDBOOKform.pickupaddress.value == "") {
	alert("Please enter your wedding day pickup address.") ;
	return false ;
	}

	if (WEDBOOKform.day.value == "") {
	alert("Please enter the day of your pickup.") ;
	return false ;
	}

	if (WEDBOOKform.month.value == "") {
	alert("Please enter the month of your pickup.") ;
	return false ;
	}

	if (WEDBOOKform.year.value == "") {
	alert("Please enter the year of your pickup.") ;
	return false ;
	}

	if (WEDBOOKform.ctime.value == "") {
	alert("Please enter the ceremony pickup time correctly.") ;
	return false ;
	}

	if (WEDBOOKform.campm.value == "") {
	alert("Please enter the ceremony pickup time correctly.") ;
	return false ;
	}

	if (WEDBOOKform.rtime.value == "") {
	alert("Please enter the reception time correctly.") ;
	return false ;
	}

	if (WEDBOOKform.rampm.value == "") {
	alert("Please enter the reception time correctly.") ;
	return false ;
	}

	if (WEDBOOKform.prtime.value == "") {
	alert("Please enter the post reception time correctly.") ;
	return false ;
	}

	if (WEDBOOKform.prampm.value == "") {
	alert("Please enter the post reception time correctly.") ;
	return false ;
	}

	var iSelect = WEDBOOKform.vehicle.options
	[WEDBOOKform.vehicle.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise us of your preferred vehicle.") ;
	return false ;
	}

	var iSelect = WEDBOOKform.hoursrequired.options
	[WEDBOOKform.hoursrequired.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please let us know approx how many hours you require our service.") ;
	return false ;
	}

	if (WEDBOOKform.photographer.value == "") {
	alert("Please provide the details of the photographer.") ;
	return false ;
	}


	if (WEDBOOKform.tripplans.value == "") {
	alert("Please let us know if you have any special instructions.") ;
	return false ;
	}

	var iSelect = WEDBOOKform.led_by.options
	[WEDBOOKform.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how you heard about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}







function changeDiv(the_div,the_change)
{
  var the_style = getStyleObject(the_div);
  if (the_style != false)
  {
    the_style.display = the_change;
  }
}

function hideAll()
{
  changeDiv("general_booking","none");
  changeDiv("wedding_booking","none");

}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}



function s_show(){return false}
function s_hide(){return false}
if(window.event+''=='undefined')event=0




var slides=[];
slides[0] = ["images/sp1.jpg", ""  , ""];
slides[1] = ["images/sp2.jpg", ""  , ""];
slides[2] = ["images/sp3.jpg", ""  , ""];
slides[3] = ["images/sp4.jpg", ""  , ""];
slides[4] = ["images/sp5.jpg", ""  , ""];
slides[5] = ["images/sp6.jpg", ""  , ""];
slides[6] = ["images/sp7.jpg", ""  , ""];
slides[7] = ["images/sp8.jpg", ""  , ""];