//JS.JS //

var bookmarkurl = "http://www.expansionjoints-hoses-bellows.co.uk";
var bookmarktitle = "Empire Horseboxes";

function addbookmark() {
if (document.all) window.external.AddFavorite(bookmarkurl, bookmarktitle);
}

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}



var win=null;
function NewWindowPos(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=10;mytop=40}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=no,status=yes,menubar=no,toolbar=yes,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

var win=null;
function NewWindowPos1(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=640;mytop=40}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=no,status=yes,menubar=no,toolbar=yes,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

var win=null;
function NewWindowPos2(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=10;mytop=40}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=no,status=yes,menubar=no,toolbar=yes,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

var win=null;
function NewWindowPos3(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=430;mytop=40}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=no,status=yes,menubar=no,toolbar=yes,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,'
win = window.open(mypage,myname,settings)
}

//  -->
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

function bulinker(where) {
top.location = where
}

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
// End -->

function createPlayerNews1(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","16");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","true");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/video-image-480-360.jpg");
	s.addVariable("showdownload","true");
	s.addVariable("repeat","false");
	s.write("placeholderNews1");
}

function createPlayer(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","16");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","true");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/video_header.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholder");
}
function createPlayerSM(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","390","312","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","12");
	s.addVariable("width","390");
	s.addVariable("height","312");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","292");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","true");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/video_header.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholderSM");
}
function createPlayerTop(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","14");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","true");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/Video_Header_Click.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholderTop");
}
function createPlayerMem(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","15");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","false");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/video-image-480-360.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholderMem");
}
function createPlayerHbox(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","15");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","false");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/video-image-480-360.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholderHbox");
}
function createPlayerNonMem(theFile) {
	var s = new SWFObject("videos/mediaplayer.swf","thePlayerId","480","380","7");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("bufferlength","18");
	s.addVariable("width","480");
	s.addVariable("height","380");
	s.addVariable("showstop","true");
	s.addVariable("displayheight","360");
	s.addVariable("overstretch","fit");
	s.addVariable("autostart","true");
	s.addVariable("volume","90");
	s.addVariable("frontcolor","0x000066");
	s.addVariable("lightcolor","0x990000");
	s.addVariable("screencolor","0xAAAAAA");
	s.addVariable("image","videos/Video_Header_Click.jpg");
	s.addVariable("showdownload","false");
	s.addVariable("repeat","false");
	s.write("placeholderNonMem");
}


/*
Live Date Script- 
&copy; Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/


var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
timestr = hours+":"+minutes+" "+dn;
//change font size here
var cdate="<font color='#3244AA' face='Verdana' size=1>"+dayarray[day]+", "+daym+" "+montharray[month]+" "+year+" "+timestr+"</font>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}



