document.js=true;
var _rootsite='http://www.sunmaster.nl'
var _templateX=900;
var _templateY=600;


var IE=(document.all)?1:0;
var IE4=(!document.getElementById&&document.all)?1:0;
var IE55=(document.getElementById&&document.all)?1:0;
var IE6=(document.getElementById&&document.all)?1:0;
var NS4=(document.layers)?1:0; 
var NS6=(document.getElementById&&!document.all)?1:0;
var DHTML=(IE||NS4||NS6)?1:0;
var MAC=(navigator.userAgent.indexOf('Mac')!=-1)?1:0;
var IEMAC=(MAC&&IE)?1:0;
//alert(IE6);

//---------disable rightclick-------------//
var message="";
function clickIE4(){
if (event.button==2){
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

//document.oncontextmenu=new Function("return false")
//---------end right click ---------------//

var _winX=0, _winY=0, _adjX=0, _adjY=0, _currX=0, _currY=0;

function getScreen()
	{	_winX=(IE)?document.body.clientWidth:window.innerWidth; 
		_winY=(IE)?document.body.clientHeight:window.innerHeight;

		
			if( typeof( window.innerWidth ) == 'number' )
				{	//Non-IE
					_winX = window.innerWidth;
					_winY = window.innerHeight;
				} 
			else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
				{	//IE 6+ in 'standards compliant mode'
					_winX = document.documentElement.clientWidth;
					_winY = document.documentElement.clientHeight;
				}
			else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
				{	//IE 4 compatible
					_winX = document.body.clientWidth;
					_winY = document.body.clientHeight;
				}
	}

function winAdjust() 
	{
		getScreen(); 
		_adjX=parseInt((_winX-_templateX-8)/2); 
		if (_adjX<=15) _adjX=15; 
			_adjY=parseInt((_winY-_templateY)/2);
//			_adjY=parseInt((_winY-_templateY-8)/2);
			//alert(_adjX);
			if (_adjY<=15) _adjY=15; 
				//document.write('<img src="images/blank.gif" width="'+_adjX+'" height="1" />');
				document.write('<img src="fileadmin/templates/images/blank.gif" width="'+_adjX+'" height="1" />');
				//document.write('<img src="fileadmin/templates/images/blank.gif" width="'+_adjX+'" height="'+_adjY+'" />');
	}
	
function checkScreen()
	{ 
		_currX=_winX; _currY=_winY;
		getScreen(); 
		if ((_currX!=_winX)||(_currY!=_winY)) location.reload();
	}

