
// WWW Support Services concepts and systems are proprietary and strictly copyright all rights reserved since 1996. Use on servers, imitation and duplication of any part of a WWW Support Services system including: look, feel, methodology, functionality and software is strictly prohibited without written license to do so and pre payment of appropriate fees.


function md(n){n.style.backgroundColor="E50000"}
function mou(n){n.style.backgroundColor=""}
function mov(n){n.style.backgroundColor="000000"}

function wov(n){n.style.backgroundColor="669966"; n.style.color="000000";} 
function wou(n){n.style.backgroundColor=""; n.style.color="669966";} 

function page()
{
// autosize()
pagecounter()
}


// page autosize

var sizefactor=1

function autosize()
{

if (! document.getElementsByTagName){alert("Your Browser is not compatible with our webpage AutoSize feature"); return;}

var cw=0

if(top.document.body && typeof(top.document.body.clientWidth)=='number'){cw=top.document.body.clientWidth} // NS7+, IE5+
else if(typeof(top.innerWidth)=='number'){cw=top.innerWidth} // NS4x, 6x, CS7, Opera

if(cw!=780){

sizefactor=cw/1000

var w=0
var ih=0
var mw=0

for(i=0; i<document.images.length; i++){

document.images[i].width=Math.round(document.images[i].width * sizefactor)
document.images[i].height=Math.round(document.images[i].height * sizefactor)

}

document.body.leftMargin=(document.body.leftMargin * sizefactor)
document.body.rightMargin=(document.body.rightMargin * sizefactor)
document.body.topMargin=(document.body.topMargin * sizefactor)

var size
var eachElement
var fontElement=document.getElementsByTagName("a")
for (i=0; i<fontElement.length; i++)
{
eachElement=fontElement[i]
// NS7, Opera
if (document.defaultView){size=document.defaultView.getComputedStyle(eachElement, null).getPropertyValue("font-size")}
// IE6
else if (eachElement.currentStyle){size=eachElement.currentStyle.fontSize}
size=size.substr(0,size.length-2)
eachElement.style.fontSize=Math.round(size*sizefactor)+"px"
}

var fontElement=document.getElementsByTagName("font")
for (i=0; i<fontElement.length; i++)
{
eachElement=fontElement[i]
// NS7, Opera
if (document.defaultView){size=document.defaultView.getComputedStyle(eachElement, null).getPropertyValue("font-size")}
// IE6
else if (eachElement.currentStyle){size=eachElement.currentStyle.fontSize}
size=size.substr(0,size.length-2)
eachElement.style.fontSize=Math.round(size*sizefactor)+"px"
}

}
}


function gety(nam)
{
obj=document.getElementById(nam); cy=0
if (document.getElementById || document.all) { while (obj.offsetParent) { cy +=obj.offsetTop; obj=obj.offsetParent } }
else if (document.layers) { cy +=obj.y }
return cy
}


// page read counter

var lcf=""
var ltcf=""

function pagecounter()
{
cp=document.getElementById('counter')
if(!cp){return}
if(typeof window.counterfile=="undefined"){lcf="driveshafttotal.js"; ltcf=""}
else{lcf=window.counterfile; ltcf=window.countertotalfile}
counterwidth=parseInt(64*sizefactor,10)
counterheight=parseInt(16*sizefactor,10)
counterfontsize=parseInt(12*sizefactor,10)
titlefontsize=parseInt(13*sizefactor,10)
cp.innerHTML='<IFRAME SRC=\"http:\/\/www.driveshaftservices.co.uk\/cgi-bin\/counter.pl?countfile='+lcf+'&fsize='+counterfontsize+'px&fcolor=003C30&fweight=400&bgcolor=003C30&mouseovercolor=FFFFFF&totalcountfile='+ltcf+'\" FRAMEBORDER=0 SCROLLING=NO WIDTH='+counterwidth+' HEIGHT='+counterheight+' marginHeight=0 marginWidth=0><\/IFRAME>'
}


function email(n)
{
var re=/@/gi
n=n.replace(re, ".")
re=/#/gi
n=n.replace(re, "@")
open("mailto:"+n)
}



