function updateCSS(f){
document.getElementsByTagName('link')[0].setAttribute('href', f);
}


function textclear(id, text){
x = document.getElementById(id);
	if (x.value == text){
	x.value = "";
	} else {
	}
}



function inputupdate(formid, ourid, checkval){
	var txt = eval("document.forms['"+formid+"']."+ourid+".value");
	if (txt == checkval){
	eval("document.forms['"+formid+"']."+ourid+".value = \"\"");
	}
}


function menucolor(id,col){
	x = document.getElementById(id);
	x.style.background = col;
}


// FADER

var opacity = 0;
var display = 1;

function updatetext(){

	display++;

		if (display == total){
		display = 0;
		}

	y = document.getElementById("cosstick");
	y.innerHTML = contents[display];

	var t = setTimeout("fadein()", 5000);
}

function fadein(){
	if (opacity < 11){
	value=(10-opacity);
	y= document.getElementById("cosstick");
	y.style.opacity = value/10;
	y.style.filter = 'alpha(opacity=' + value*10 + ')';
	var t = setTimeout("fadein()",50);
	opacity++;
	} else {
	updatetext();
	fadeout();
	}

}


function fadeout(){
	if (opacity >-1){
	y= document.getElementById("cosstick");
	value=(10-opacity);
	y.style.opacity = value/10;
	y.style.filter = 'alpha(opacity=' + value*10 + ')';
	opacity--;
	var t = setTimeout("fadeout()",50);
	} else {
	}
}


function printpage() {
window.print();  
}

function emailpage(thelocation){
lovechild = window.open("send_to_a_friend.php?uri=" + thelocation,"babywindow","height=480,width=640,toobar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0");
}

function doOpaque(inid, inopacity){
mozopac = inopacity / 100;
x = document.getElementById(inid);
x.style.filter = "alpha(opacity="+inopacity+")";
x.style.opacity = mozopac;
}


function scrollImage(){
x = document.getElementById("rotate");
y = (x.style.background);
y= y.split("repeat-x ");
//alert (y[1]);
z = y[1].split("px");
px = z[0].replace("scroll ", "");
px = parseInt(px, 10);

px--;

x.style.background = "#ffffff url(rotheader.jpg) repeat-x "+ px+"px 6px";
var t = setTimeout("scrollImage()",50);
}


