
// WWW Support Services (tm) concepts and systems are proprietary and strictly copyright all rights reserved since 1996. Use on servers, imitation and duplication of any part of a system including: look, feel, methodology, functionality and software is strictly prohibited without written license to do so and pre payment of appropriate fees.

// Menu Control

var mdc="0000FF"  
var mouc="BCD5FF"  
var movc="76C2FF"

function md(n){n.style.backgroundColor=mdc}
function mou(n){n.style.backgroundColor=mouc}
function mov(n){n.style.backgroundColor=movc}

// footer control

var fdc="FF0000"  
var foc="0099CC"
var fuc="006699" 

function fd(n,l){n.style.backgroundColor=fdc; fl(l)}
function fo(n){n.style.backgroundColor=foc}
function fu(n){n.style.backgroundColor=fuc}
function fl(l){document.location=l}


// page control

function page()
{
//webscreen()
autosize()
webscreen()
pagecounter()
}


// page autosize

var sizefactor=1
var tw=0
var mw=0

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/780

var w=0
var ih=0
mw=0
tw=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("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"
}
}
}

var rnd=0
var firstscreen=0

function webscreen()
{
rnd=Math.random()
rnd=parseInt(rnd*10)
loadscreen()
}

function loadscreen()
{
var fname="website"+rnd.toString()+".jpg"
mw=document.images["scrleft"].width
mw+=document.images["scrright"].width
tw=document.images["scrtop"].width
scrw=tw-mw
scrh=document.images["scr"].height
document.getElementById("website").innerHTML="<IMG NAME=\"scr\" SRC=\""+fname+"\" WIDTH="+scrw+" HEIGHT="+scrh+">"
document.images["scrbottom"].width=scrw
firstscreen=1
}

function nextscreen()
{
if(firstscreen=0){return;}
rnd++
if(rnd>9){rnd=0} 
loadscreen()
}


// page read counter

function pagecounter()
{
counterwidth=parseInt(80*sizefactor,10)
counterheight=parseInt(20*sizefactor,10)
counterfontsize=parseInt(14*sizefactor,10)
titlefontsize=parseInt(13*sizefactor,10)
cp=document.getElementById('counter')
cp.innerHTML='<IFRAME SRC=\"http:\/\/www.adindex.co.uk\/cgi-bin\/counter.pl?countfile='+counterfile+'&fsize='+counterfontsize+'px&fcolor=707070&fweight=400&bgcolor=FFFFFF&mouseovercolor=\" FRAMEBORDER=0 SCROLLING=NO WIDTH='+counterwidth+' HEIGHT='+counterheight+' marginHeight=0 marginWidth=0><\/IFRAME>'
}
