// Script

function blockError(){return true;}
window.onerror = blockError;


// Block Image Toolbar
document.write('<meta http-equiv="imagetoolbar" content="no">')


// Right Click Protect
var right_click_text	= "Sorry, we do not allow right clicks on our site."	

var message=right_click_text;
if (navigator.appName == 'Microsoft Internet Explorer'){
function NOclickIE(e) {
if (event.button == 2 || event.button == 3) {
alert(message);
return false;
}
return true;
}
document.onmousedown=NOclickIE;
document.onmouseup=NOclickIE;
window.onmousedown=NOclickIE;
window.onmouseup=NOclickIE;
}
else {
function NOclickNN(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=NOclickNN; }
document.oncontextmenu=new Function("alert(message);return false")
}

// Buttons.js
if (document.images)   {
     image1on = new Image();
     image1on.src="images/vendor_but2.png";

     image1off = new Image();
     image1off.src = "images/vendor_but1.png";}
       
if (document.images)   {
     image2on = new Image();
     image2on.src="images/show_but2.png";

     image2off = new Image();
     image2off.src = "images/show_but1.png";}

if (document.images)   {
     image3on = new Image();
     image3on.src="images/button04.png";

     image3off = new Image();
     image3off.src = "images/button03.png";}
	 
if (document.images)   {
     image4on = new Image();
     image4on.src="images/printr.gif";

     image4off = new Image();
     image4off.src = "images/printw.gif";}

function turnon(imageName)   {
     if (document.images)   {
     document[imageName].src = eval(imageName + "on.src");}}

function turnoff(imageName)   {
     if (document.images)   {
     document[imageName].src = eval(imageName + "off.src");}}

// Email.js
function mail_JS()
{
var str='';
str+='<a href="mailto:gasguys@hotmail.com?subject=Gas Guys - Information" onmouseover="turnon(\'image3\')" onmouseout="turnoff(\'image3\')"><img src="images\/button03.png" image" name="image3" border="0" width="142" height="44"><\/a>';
document.write(str);
}

// Show Vendor Button.js
function showvendor_JS()
{
var str='';
str+='<a target="_blank" href="forms/vendor030412.pdf" onmouseover="turnon(\'image1\')" onmouseout="turnoff(\'image1\')"><img src="images\/vendor_but1.png" image" name="image1" border="0" width="127" height="38"><\/a>';
document.write(str);
}

// Show Flyer Button.js
function showflyer_JS()
{
var str='';
str+='<a target="_blank" href="forms/flyer030412.pdf" onmouseover="turnon(\'image2\')" onmouseout="turnoff(\'image2\')"><img src="images\/show_but1.png" image" name="image2" border="0" width="127" height="38"><\/a>';
document.write(str);
}

// No Show Vendor Button.js
function noshowvendor_JS()
{
var str='';
str+='<a onmouseover="turnon(\'image1\')" onmouseout="turnoff(\'image1\')"><img src="images\/vendor_but1.png" image" name="image1" border="0" onClick="open_wWindowNoFlyer()" width="127" height="38"><\/a>';
document.write(str);
}

// No Show Flyer Button.js
function noshowflyer_JS()
{
var str='';
str+='<a onmouseover="turnon(\'image2\')" onmouseout="turnoff(\'image2\')"><img src="images\/show_but1.png" image" name="image2" border="0" onClick="open_wWindowNoFlyer()" width="127" height="38"><\/a>';
document.write(str);
}

// No Show Flyer Window
function open_wWindowNoFlyer()
{
wWindowNoFlyer = window.open("http://www.gasguys1.com/noflyer.php","WindowNoFlyer","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=650,height=180,top=200,left=200");
}

// Print Info Button.js
function printinfo_JS()
{
var str='';
str+='<a target="_blank" href="images/motel_info.pdf" onmouseover="turnon(\'image4\')" onmouseout="turnoff(\'image4\')"><img src="images\/printw.gif" image" name="image4" border="0" width="162" height="43"><\/a>';
document.write(str);
}
