// JavaScript Document
 theImage = null;
 function resizeImage(o){
 	if(o.width >= 200 || o.height >= 200 ){
 		o.width *= 0.4;
 		o.onclick = openImage;
 		o.style.cursor = "pointer";//mozilla
 		o.style.cursor = "hand";//IE
 		}else{
 		o.onclick = openImage;
 		o.style.cursor = "pointer";//mozilla
 		o.style.cursor = "hand";//IE
 		}

 	}
 function openImage(){
 	if (theImage && !theImage.closed) theImage.window.close();
 	var i = new Image();
 	i.src = this.src;
 	theImage = window.open('','ImageWindow','left=100,top=100,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,width='+i.width+',height='+i.height);
	theImage.document.write("<html><title>image</title><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><img src=\""+i.src+"\" border=0 alt=''></body></html>");
	theImage.clientWidth = i.width;
	theImage.clientHeight = i.height;
	theImage.focus();
 	}

 function openAlbumImage(imgsrc){
/*
 	if (theImage && !theImage.closed) {
 	theImage.window.close();
 	theImage==null;
 	}*/
 	var i = new Image();
 	i.src = imgsrc;
 if (!theImage || theImage.closed){
 	theImage = window.open('','ImageWindow','left=100,top=100,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,width='+i.width+',height='+i.height);
	theImage.document.write("<html><title>image</title><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><img id='popimage' src=\""+i.src+"\" border=0 alt=''></body></html>");
} else {
	theImage.popimage.src = i.src;
}
	theImage.clientWidth = i.width;
	theImage.clientHeight = i.height;
	//theImage.resizeTo(i.width,i.height);
	window.status = i.width+", "+i.height;
	theImage.focus();

 	}
function ResetMessage(txt,field) {
		document.newmessage[field].value += txt;
		return;
		/*
  	if (document.newmessage.message.createTextRange) {
  		alert("IE fork");
  		document.newmessage[field].focus();
  		document.newmessage.createRange().duplicate().text = txt;
   	} else {
  		document.newmessage[field].value += txt;
   	}

   	*/
}

var query = new Array();
query['d1']="DS+1";
query['h1']="HS+1";
query['d2']="DS+2";
query['h2']="HS+2";
query['d3']="DS+3";
query['h3']="HS+3";
query['d4']="DS+4";
query['h4']="HS+4";
query['d5']="DS+5";
query['h5']="HS+5";
query['d6']="DS+6";
query['h6']="HS+6";

function openStand(team){

	url="http://competitie.nevobo.nl/west/team/6205"+query[team]
	winstand=window.open(url,'team'+team,'toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=1000,height=650');
	winstand.focus();
}
function openUTRNW(){
	url="http://competitie.nevobo.nl/west/zaal/UTRNW";
	winstand=window.open(url,'osg','toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=1000,height=650');
	winstand.focus();
}

function openSwitch(){
	url="http://competitie.nevobo.nl/west/vereniging/6205";
	winstand=window.open(url,'switch','toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=1000,height=650');
	winstand.focus();
}
//window.resizeTo(800,600);
//center site
function Center(){
	if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
	//	frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
	//	frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
	//	frameHeight = document.body.clientHeight;
	}
	theCenterDiv=document.getElementById("centerdiv");
	theLeft=Math.round((frameWidth/2)-750/2);
//	theTop=Math.round((frameHeight/2)-308/2);
	theCenterDiv.style.left=theLeft+"px";
//	theCenterDiv.style.top=theTop+"px";
	theCenterDiv.style.visibility='inherit';
}
window.onresize=Center;