$werk_object	=	"";
$werk_dnr		=	0;
$werk_html		=	"";
$menu_object	=	0;
$spin_object	=	0;
function js_opties () {
	if ( !document.all ) return;
	$d = document.body.all;
	for ( $ic in $d ) {
		if ( $d[$ic].className == "cel_8" && document.getElementById('mister_account').value == "webwinkel" )	{
			$spin_object = $d[$ic];
			window.setTimeout("spin()", 2000);
		}
		if ( typeof $d[$ic].id != "string" ) continue;
		if ( $d[$ic].id == "" ) continue;
		if ( $d[$ic].id.substr(0,6) == "kleur_" ) {
			$c = $d[$ic].id.split("_");
			$werk_kleur1 = $c[1];
			$werk_kleur2 = $c[2];
			$d[$ic].onmouseover	= function anonymous() {sch_kleur(this, $werk_kleur1)};
			$d[$ic].onmouseout	= function anonymous() {sch_kleur(this, $werk_kleur2)};
		} else if ( $d[$ic].id == "wegklik" ) $d[$ic].onclick	= function anonymous() {wegklik(this)};
		if ( $d[$ic].id == "gordijn" ) $d[$ic].onclick	= function anonymous() {gordijn(this)};
		if ( $d[$ic].id == "linksrechts" ) {
			$d[$ic].onmouseover	= function anonymous() {sch_links(this, 0)};
			$d[$ic].onmouseout	= function anonymous() {sch_links(this, 1)};
		}
	}
}
function sch_kleur($obj, $kl) {
	$obj.style.color = "#" + $kl;
}
function wegklik($obj) {
	$werk_object = $obj;
	$werk_object.style.width	= "";
	$werk_object.style.position	= "absolute";
	$werk_object.style.overflow	= "hidden";
	$werk_dnr = window.setInterval("sch_left()", 10);
}
function sch_left() {
	if ( $werk_object.offsetLeft > 5 )		$werk_object.style.left		= $werk_object.offsetLeft - 3;
	if ( $werk_object.offsetTop > 5 )		$werk_object.style.top		= $werk_object.offsetTop - 3;
	if ( $werk_object.offsetWidth > 5 )		$werk_object.style.width	= $werk_object.offsetWidth - 6;
	if ( $werk_object.offsetHeight > 5 )	$werk_object.style.height	= $werk_object.offsetHeight - 3;
	if ( $werk_object.offsetLeft < 6 ) {
		cl_object();
		window.clearInterval($werk_dnr);
	}
}
function cl_object() {
	$werk_object.style.visibility	= "hidden";
	$werk_object.style.height		= 0;
	$werk_object.style.width		= 0;
	$werk_object.style.left			= 0;
	$werk_object.style.top			= 0;
}
function gordijn($obj) {
	$h = document.getElementById('use_host').value
	$werk_object = $obj;
	$werk_html = $obj.innerHTML;
	$html = "<div id='s_g' style='position: absolute; height: 0; overflow: hidden'>";
	$html += "<table cellpadding=0 cellspacing=0 border=0 style='width: 100%; height: 100%'><tr>";
	$html += "<td style='width: 50%'><img id='imgl' src='" + $h + "/images/black.gif' width='100%' height='100%'></td>";
	$html += "<td style='width: 50%; text-align: right'><img id='imgr' src='" + $h + "/images/black.gif' width='100%' height='100%'></td>";
	$html += "</tr></table>";
	$html += "</div>";
	$ww = $werk_object.offsetWidth;
	$wh = $werk_object.offsetHeight;
	$werk_object.innerHTML = $html + $werk_object.innerHTML
	$sg = document.all['s_g'];
	$sg.style.width = $ww;
	$sg.style.height = $wh;
	document.all['imgl'].style.width = "100%";
	document.all['imgr'].style.height = "100%";
	$werk_dnr = window.setInterval("sch_schuif()", 10);
}
function sch_schuif() {
	$x = document.all['imgl'].offsetWidth-5;
	$x2 = document.all['imgr'].offsetWidth-5;
	if ( $x < 1 || $x2 < 1 ) {
		$werk_object.innerHTML = $werk_html;
		window.clearInterval($werk_dnr);
		return;
	}
	document.all['imgl'].style.width = $x
	document.all['imgr'].style.width = $x2;
}
function sch_links($obj, $nr) {
	if ( $nr == 0 ) {
		$obj.style.textAlign = "right";
		$obj.innerHTML = "rechts";
	} else {
		$obj.style.textAlign = "left";
		$obj.innerHTML = "links";
	}
}
function spin () {
	$spin_object.style.backgroundImage = "url(http://www." + document.getElementById('mister_domein').value + "/accounts/webwinkel/images/" + document.getElementById('mister_page').value + ".gif)";
	$spin_object.style.backgroundRepeat = "no-repeat";
	$spin_object.style.backgroundPositionX = "right";
	$spin_object.style.backgroundPositionY = -20;
}

