// JavaScript Document

function AjaxAntwoord(Antwoord,Tracker,Teller){	
	if(Tracker == "UitvoeringenOphalen"){
		document.getElementById("Selectors").innerHTML = Antwoord;
	}			
}
function UitvoeringenOphalen(KleurId, SchermformaatId, VerhoudingId, ProductId, CategorieId, Aantal, GekozenProductId, Teller){
	var KleurId = KleurId;
	var ProductId = ProductId;
	var Aantal = Aantal;
	var GekozenProductId = GekozenProductId;
	var CategorieId = CategorieId;
	var VerhoudingId = VerhoudingId;
	var SchermformaatId = SchermformaatId;
	var Teller = Teller;
	document.getElementById("Selectors").innerHTML = "Een ogenblik geduld a.u.b.";
	AjaxContact('http://www.projectieschermenmeer.nl/aj_uitvoeringophalen.php?GekozenProductId='+GekozenProductId+'&Aantal='+Aantal+'&CategorieId='+CategorieId+'&ProductId='+ProductId+'&KleurId='+KleurId+'&VerhoudingId='+VerhoudingId+'&SchermformaatId='+SchermformaatId,'get','UitvoeringenOphalen', Teller);
}

function submenu(ID){
//	alert("weet je het zeker");
if (document.getElementById(ID).className == 'puldown_uit')
	{
	document.getElementById(ID).className = 'puldown';
	}
	else 
	{
	document.getElementById(ID).className = 'puldown_uit';
	}
}
function viewFoto(URL){
	var URL = URL;
	var Maxbreedte = screen.width;
	var Maxhoogte = screen.height;
	Nieuwscherm =window.open(URL,"foto_up","toolbar=no,location=no,scrollbars=no,status=no,menubar=no,resizable=no,width="+Maxbreedte+"px,height="+Maxhoogte+"px");
	Nieuwscherm.focus();
}
function SizeFoto(){
	var VerhoudingOrigineel = eval(pic).width / eval(pic).height;
	var Maxbreedte = screen.width - 20;
	var Maxhoogte = screen.height - 20;

	if(Maxbreedte<eval(pic).width){
		eval(pic).width = Maxbreedte;
	}
	if(Maxhoogte<eval(pic).height){
		eval(pic).height = Maxhoogte;
		eval(pic).width = (Maxhoogte*VerhoudingOrigineel);
	}

	var PositieLinks = (screen.width-eval(pic).width+28)/2;
	var PositieBoven = (screen.height-eval(pic).height+28)/2;

	window.moveTo(PositieLinks, PositieBoven);
	window.resizeTo(eval(pic).width+28, eval(pic).height+68);
	window.moveTo(PositieLinks, PositieBoven);

}
function Controle_login(){
	var Foutmelding = '';
	submitOK='True';

	if (document.Formulier.Gebruikersnaam.value.length==0){
		Foutmelding = Foutmelding + '- Login.\n';
		document.Formulier.Gebruikersnaam.style.border = '1px solid #ff0000';
		submitOK='False';
	}
	else{
		document.Formulier.Gebruikersnaam.style.border = '1px solid #000000';
	}
	if (document.Formulier.Wachtwoord.value.length==0){
		Foutmelding = Foutmelding + '- Wachtwoord.\n';
		document.Formulier.Wachtwoord.style.border = '1px solid #ff0000';
		submitOK='False';
	}
	else{
		document.Formulier.Wachtwoord.style.border = '1px solid #000000';
	}
	if (submitOK=='False'){
		alert('U dient de volgende velden verplicht in te vullen:\n' + Foutmelding);
		return false;
	}
}

function Verhuizen(){
	Nieuwscherm =window.open("http://www.projectieschermenmeer.nl/Verhuis/index.php","Verhuizen","toolbar=no,location=no,scrollbars=no,status=no,menubar=no,resizable=no,width=860px,height=620px");
	Nieuwscherm.focus();
}

