// JavaScript Document :: © 2006 Ike Design studio

// ::: ID functie -> Plaats nieuw Venster in het midden van Scherm

function ToonFotoGroot(jvURLcontent){
	//alert("jvURLcontent = "+ jvURLcontent );
	vContent1= new Image();
	vContent1.src=(jvURLcontent);
	CheckFoto(jvURLcontent);
}

function CheckFoto(jvURLcontent){
	if((vContent1.width!=0)&&(vContent1.height!=0)){
		//alert("vContent1.width = "+ vContent1.width+"   vContent1.height = "+ vContent1.height);
		ToonVenster(jvURLcontent);
	}else{
		uitvoering="CheckFoto('"+jvURLcontent+"')";
		interval=setTimeout(uitvoering,20);
	}
}

//function fToonFoto(jvURLcontent){
function ToonVenster(jvURLcontent){	
	vBreed = vContent1.width + 30;
	vHoog = vContent1.height + 60;
	jvVensterBreedte = vBreed;
	jvVensterHoogte = vHoog;
	//alert("maten = "+ jvVensterBreedte + " x "+jvVensterHoogte );
	
	// Venster properties:
	VensterProp = "width=" + jvVensterBreedte;
	VensterProp = VensterProp + ",height=" + jvVensterHoogte;
	VensterProp = VensterProp + ",resizable=" + "yes";
	VensterProp = VensterProp + ",scrollbar=" + "no";
	VensterProp = VensterProp + ",menubar=" + "no";
	VensterProp = VensterProp + ",toolbar=" + "no";
	VensterProp = VensterProp + ",directories=" + "no";
	VensterProp = VensterProp + ",location=" + "no";
	VensterProp = VensterProp + ",status=" + "no";
	VensterProp = VensterProp + ",copyhistory=" + "no";
	// Bepaal de midden positie
	VensterProp = VensterProp + ",left="+((screen.width-jvVensterBreedte)/2);
	VensterProp = VensterProp + ",top="+((screen.height-jvVensterHoogte)/2);
	
	jvNieuwVenster = window.open("","KAN",VensterProp);
	
	jvNieuwVenster.document.write("<html>\n<head>\n<title>BWT</title>\n");
	jvNieuwVenster.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n");
	jvNieuwVenster.document.write("<meta http-equiv=\"scrollbar\" content=\"no\">\n");
	jvNieuwVenster.document.write("</head>\n\n<body bgcolor=\"#ffffff\" align=\middle\ style=\"margin: 0 0 0 0;\">\n"); 
	jvNieuwVenster.document.write("<br><img src=\""+jvURLcontent+"\" border=\"0\" onclick=\"javascript:window.close()\">\n"); 
	jvNieuwVenster.document.write("<br><b><font face=verdana color=#857E76 size=1>BWT weegtechniek <font color=#993333>::</font> the netherlands <font color=#993333>::</font> t. +31(0)411-677 788</fonts></b><br></body>\n</html>\n");
	
	//jvNieuwVenster.focus();
	jvNieuwVenster.document.focus();
	jvNieuwVenster.document.close(); 
}
// ::: ID functie -> Plaats nieuw Venster in het midden van Scherm - SchermGrootte = 505x745px
function NieuwVensterInCenter(jvURLcontent,b,h){
	jvVensterBreedte = b;
	jvVensterHoogte = h;
	jvInternTitel = ""; // ::: MOET altijd aan elkaar geschreven zijn of leeg
	
	// Venster properties:
	var VensterProp = "width=" + jvVensterBreedte;
	VensterProp = VensterProp + ",height=" + jvVensterHoogte;
	VensterProp = VensterProp + ",resizable=" + "yes";
	VensterProp = VensterProp + ",scrollbar=" + "no";
	VensterProp = VensterProp + ",menubar=" + "no";
	VensterProp = VensterProp + ",toolbar=" + "no";
	VensterProp = VensterProp + ",directories=" + "no";
	VensterProp = VensterProp + ",location=" + "no";
	VensterProp = VensterProp + ",status=" + "no";
	VensterProp = VensterProp + ",copyhistory=" + "no";
	
	jvNieuwVenster = window.open(jvURLcontent,jvInternTitel,VensterProp);
	
	// Bepaal de midden positie
	var SchermBreedte = screen.width;
	var SchermHoogte = screen.height;	
	var VensterPositieHOR = (SchermBreedte - jvVensterBreedte)/2;
	var VensterPositieVER = (SchermHoogte - jvVensterHoogte)/2;
	window.status = "Scherm: "+SchermBreedte +" x " +SchermHoogte+ " ::: Venster: "+ jvVensterBreedte +" x "+ jvVensterHoogte;
	
	jvNieuwVenster.moveTo(VensterPositieHOR,VensterPositieVER);
	jvNieuwVenster.focus();
}
