/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
********************************************************************************/
//Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()
/********************************************************************************
Here's the pageobject, see www.bratta.com/dhtml for tutorial on how it works.
********************************************************************************/
function makePageObject(){
	this.x=0;
	this.x2=(bw.ns4 || bw.ns5)?innerWidth:document.body.offsetWidth-4;
	this.y=0;
	this.y2=(bw.ns4 || bw.ns5)?innerHeight:document.body.offsetHeight-4;
	this.x50=this.x2/2;
	this.y50=this.y2/2;
	this.x10=(this.x2*10)/100
	this.y10=(this.y2*10)/100
	this.x15=(this.x2*15)/100
	this.y15=(this.y2*15)/100
	return this;
}
function resized(){
	page2=new makePageObject()
	if(page2.x2!=page.x2 || page2.y2!=page.y2){
		location.reload() //If the width or height have changed we reload the page.
	}
}

function myStyle(){
	page=new makePageObject()
	siz=page.x2/115 + page.y2/115
	zwischenraum=page.x2/200;
	col01 = '#c0c0c0';
	col02 = '#223333';
	col03 = '#556666'; //col03 = '#333333'; col03 = '#445555'; 
	col04 = '#900000';
	col05 = '#00cc99';
	col06 = '#505050';
	col07 = '#202020';
	col08 = '#404040';	
	col09 = '#292929';								
        document.write("<style type='text/css'>");
        document.write("a:active { text-decoration:none; color:"+col01+"; }");
        document.write("a:hover { text-decoration:none; color:"+col01+"; }");
        document.write("a:link { text-decoration:none; color:"+col01+"; }");
        document.write("a:visited { text-decoration:none; color:"+col01+"; }");
        document.write(".bodyg { background-color:"+col02+"; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0;width:100%;height:100%;overflow:hidden;}");
        document.write(".bodyb { background-color:"+col03+"; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0;width:100%;height:100%;overflow:hidden;}");
        document.write("font { font-family:Verdana,Arial,sans-serif; }");
        document.write(".fon01 { color:"+col01+"; font-weight:700; font-size:"+siz+"px; }");
        document.write(".fon02 { color:"+col01+"; font-weight:500; font-size:"+siz+"px; }");
        document.write(".fon03 { color:"+col01+"; font-weight:700; font-size:"+siz*1.2+"px; }");
        document.write(".fon04 { color:"+col01+"; font-weight:700; font-size:"+siz*1.5+"px; }");
        document.write(".fon05 { color:"+col04+"; font-weight:700; font-size:"+siz+"px; }");
        document.write(".fon06 { color:"+col04+"; font-weight:700; font-size:"+siz*1.2+"px; }");
        document.write(".fon07 { color:"+col04+"; font-weight:700; font-size:"+siz*2+"px; }");
        document.write(".fon08 { color:"+col04+"; font-weight:700; font-size:"+siz*2.5+"px; }");
        document.write(".fon09 { color:"+col04+"; font-weight:500; font-size:"+siz*.9+"px; }");
        document.write(".fon10 { color:"+col04+"; font-weight:900; font-size:"+siz+"px; }");
        document.write(".fon11 { color:"+col05+"; font-weight:700; font-size:"+siz+"px; visibility:hidden; }");
        document.write(".fon12 { color:"+col05+"; font-weight:700; font-size:"+siz+"px; }");
        document.write(".fon13 { color:"+col02+"; font-weight:500; font-size:"+siz*.1+"px; }");
        document.write(".fon14 { color:"+col03+"; font-weight:500; font-size:"+siz*.9+"px; }");        
        document.write(".fon15 { color:"+col02+"; font-weight:500; font-size:"+siz*.9+"px; }");
        document.write(".fon16 { color:"+col01+"; font-weight:700; font-size:"+page.x2/10+"px; }");
        document.write(".tab01 { border:0px; }");
	document.write(".tab02 { background-color:"+col03+"; border-style:solid; border-width:1px; border-top-color:"+col06+"; border-bottom-color:"+col07+"; border-left-color:"+col06+"; border-right-color:"+col07+"; }");        
        document.write(".tab03 { border:0px; background-color:"+col02+"; }");
        document.write(".tab04 { border:0px; background-color:"+col03+"; }");
	document.write(".tab05 { background-color:"+col02+"; border-style:none; border-width:'"+page.x2/50+"px'; border-color='"+col02+"'; }");              
        document.write(".cel01 { background-color:"+col02+"; border-style:solid; border-width:1px; border-top-color:"+col08+"; border-bottom-color:"+col09+"; border-left-color:"+col08+"; border-right-color:"+col09+"; cursor:default; }");
        document.write(".cel02 { background-color:"+col02+"; border-style:solid; border-width:1px; border-top-color:"+col07+"; border-bottom-color:"+col06+"; border-left-color:"+col06+"; border-right-color:"+col07+"; cursor:hand; }");
        document.write(".cel03 { padding-top:0px; padding-bottom:"+zwischenraum+"px; padding-left:0px; padding-right:"+zwischenraum+"px; }");
        document.write(".cel04 { padding-top:0px; padding-bottom:"+zwischenraum+"px; padding-left:"+zwischenraum+"px; padding-right:"+zwischenraum+"px; }");
        document.write(".cel05 { background-color:"+col02+"; border-style:solid; border-width:1px; border-top-color:"+col07+"; border-bottom-color:"+col06+"; border-left-color:"+col07+"; border-right-color:"+col06+"; padding-top:"+siz/2+"px; padding-bottom:"+siz/2+"px; padding-left:"+siz/2+"px; padding-right:"+siz/2+"px; }");
        document.write(".cel06 { background-color:"+col03+"; border-style:none; border-width:1px; border-color:"+col03+"; }");  
       	document.write(".seeon { visibility:visible; }");
       	document.write(".seeof { visibility:hidden; }");
        document.write(".alig01 { text-align:center; vertical-align:top; }");
        document.write(".alig02 { text-align:center; vertical-align:middle; }");
        document.write(".alig03 { text-align:center; vertical-align:bottom; }"); 
        document.write(".horu1 { color:"+col02+"; }"); 	
       	document.write("</style>");
        window.onresize=resized;
}
