var message="© 2009 Pioneer Camper Trailers, All Rights Reserved.\n\nYou are not permitted to copy any content or images contained\nwithin this page without written consent from the site owner!";


function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 





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 PopupPic(sPicURL) { 
     window.open( "popup.html?"+sPicURL+"?"+escape('Item enlarged'), "",  
     "resizable=1,HEIGHT=200,WIDTH=200,LEFT=150,TOP=50"); 
}




function emPG()
	{
	(document.location='mailto:?subject=Pioneer Camper Trailers&body=Check this link out from the Pioneer Camper Trailers web site: '+document.location)
		}


function addBM()
	{
	bookmarkurl="http://www.pioneercampers.com"
	bookmarktitle="Pioneer Camper Trailers - 'In Front - Outback'"
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle)
		}




function adet()
	{	
		if (document.getElementById("wsadet").value == "eg: 22 John Street, Johnsville")
		{
			document.getElementById("wsadet").value='';
		}
	}


function adetii()
	{	
		if (document.getElementById("wsadetii").value == "eg: 22 John Street, Johnsville")
		{
			document.getElementById("wsadetii").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 validateBform(Bform) {

	if (Bform.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}

	if (Bform.postal_address.value == "") {
	alert("Your postal address is required.") ;
	return false ;
	}

	var iSelect = Bform.state.options
	[Bform.state.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please select your state within Australia.") ;
	return false ;
	}
	
	if (Bform.postcode.value == "") {
	alert("Your post code is required.") ;
	return false ;
	}


	if( notValidEmail( Bform.email ) ){
	alert( 'Please enter a valid email address' );
	return false;
	}

	else {
	return true ;
       }
}



function validateCform(Cform) {

	
	if (Cform.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}

	if( notValidEmail( Cform.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}
	
	if (Cform.message.value == "") {
	alert("Please specify your reason for this general enquiry.") ;
	return false ;
	}

	var iSelect = Cform.led_by.options
	[Cform.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how did you hear about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}





function validateC2form(C2form) {

	
	if (C2form.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}
	
	if( notValidEmail( C2form.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}
	
	if (C2form.message.value == "") {
	alert("Please specify your reason for this sales enquiry.") ;
	return false ;
	}

	var iSelect = C2form.led_by.options
	[C2form.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how did you hear about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}











function validateC3form(C3form) {

	
	if (C3form.first_name.value == "") {
	alert("Please enter your first name.") ;
	return false ;
	}

	if (C3form.last_name.value == "") {
	alert("Please enter your last name or initial.") ;
	return false ;
	}

	if (C3form.postal_address.value == "") {
	alert("Please enter your postal or street address.") ;
	return false ;
	}

	if (C3form.state.value == "") {
	alert("Please select your state within Australia.") ;
	return false ;
	}

	if (C3form.post_code.value == "") {
	alert("Please enter your post code.") ;
	return false ;
	}

	if( notValidEmail( C3form.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}
	
	var iSelect = C3form.led_by.options
	[C3form.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how did you hear about us.") ;
	return false ;
	}

	else {
	return true ;
       }
}






function validateC4form(C4orm) {

	
	if (C4form.name.value == "") {
	alert("Please enter your name.") ;
	return false ;
	}

	if( notValidEmail( C4form.email ) ){
	alert( 'Please enter a valid email address.' );
	return false;
	}

	if (C4form.website_rating.value == "") {
	alert("Please rate our website.") ;
	return false ;
	}

	if (C4form.product_rating.value == "") {
	alert("Please rate our camper trailers.") ;
	return false ;
	}

	if (C4form.feedback.value == "") {
	alert("Please specify your reason for this feedback.") ;
	return false ;
	}
	
	var iSelect = C4form.led_by.options
	[C4form.led_by.selectedIndex].value ;
	if (iSelect == "") {
	alert("Please advise on how did you hear 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_enquiry","none");
  changeDiv("sales_enquiry","none");
  changeDiv("get_brochure","none");
  changeDiv("pioneer_feedback","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