//*********** POPUP CONTACT EMAIL FORM ************//
function sendmail(wie,taal){

    var newWidth = (screen.width);
    var newHeight = (screen.height);
	
	var kotWidth = 500;
	var kotHeight = 500;
	
    LeftPosition = (newWidth/2) - (kotWidth/2);
    TopPosition = (newHeight/2) - (kotHeight/2);

	link = "sendmail/contact.asp?who=" + wie;
    options = "toolbar=0,status=0,menubar=0,scrollbars=0,location=no,top=" + TopPosition + ",left=" + LeftPosition + ",resizable=0,width=" + kotWidth + ",height=" + kotHeight + "+";

    contactwindow = window.open(link,wie, options);	
}
//*************************************************//

//Imageviewer showPicPopup function
function showPicPopup(picwidth,picheight,baseurl,fotomap,fotosubmap,picname) {

    var newWidth = (screen.width);
    var newHeight = (screen.height);
	
	var kotWidth = picwidth;
	var kotHeight = picheight + 25;
	
    LeftPosition = (newWidth/2) - (kotWidth/2);
    TopPosition = (newHeight/2) - (kotHeight/2);
	
	link = baseurl + "tracks/showimage.asp?pic=" + picname + "&fotomap=" + fotomap + "&fotosubmap=" + fotosubmap;
    options = "toolbar=0,status=0,menubar=0,scrollbars=0,location=no,top=" + TopPosition + ",left=" + LeftPosition + ",resizable=0,width=" + kotWidth + ",height=" + kotHeight + "+";

    imgwindow = window.open(link,"", options);

}

// showPicture function  - Om foto in popup te tonen
function showPicture(picurl,picwidth,picheight) {

    var newWidth = (screen.width);
    var newHeight = (screen.height);
	
	var kotWidth = picwidth;
	var kotHeight = picheight + 25;
	
    LeftPosition = (newWidth/2) - (kotWidth/2);
    TopPosition = (newHeight/2) - (kotHeight/2);
	
	link = "http://www.worldkarts.com/includes/showpicture.asp?url=" + picurl;
    options = "toolbar=0,status=0,menubar=0,scrollbars=0,location=no,top=" + TopPosition + ",left=" + LeftPosition + ",resizable=0,width=" + kotWidth + ",height=" + kotHeight + "+";

    picwindow = window.open(link,"", options);

}

//*************************************************//



// datePicker function  - Om foto in popup te tonen
function datePicker(lang,elt) {

    var newWidth = (screen.width);
    var newHeight = (screen.height);
	
	var kotWidth = 172;
	var kotHeight = 250;
	
    LeftPosition = (newWidth/2) - (kotWidth/2);
    TopPosition = (newHeight/2) - (kotHeight/2);
	
	link = "datepicker/mlcpopup.asp?lang=" + lang + "&elt=" + elt;
    options = "toolbar=0,status=0,menubar=0,scrollbars=0,location=no,top=" + TopPosition + ",left=" + LeftPosition + ",resizable=0,width=" + kotWidth + ",height=" + kotHeight + "+";

    picwindow = window.open(link,"", options);
}

//*************************************************//







//enable all form fields // zodanig dat de velden via request.form leesbaar zijn bij submitten
function EnableAll(objForm) {
    for (var i=0; i<objForm.elements.length; i++)
 	  objForm.elements[i].disabled = false;
    return true;
}
//*************************************************//



//*************************************************//
//TOOLTIP FUNCTIE
function updateTooltip(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (tt != null) {
		tt.style.left = (x + 20) + "px";
		tt.style.top = (y + 20) + "px";
	}
}
function showTooltip(id) {
	tt = document.getElementById(id);
	tt.style.display = "block"
}

function hideTooltip() {
	tt.style.display = "none";
}
//*************************************************//


//*************************************************//
//FLASH HIDE
function Hide(id) {
	document.getElementById(id).style.display='none';
}
//*************************************************//

//*************************************************//
function ReverseDisplay(d) {
	if(document.getElementById(d).style.display == "none") {
		document.getElementById(d).style.display = "block";
		document.getElementById("ico1").style.backgroundPosition = "-11px 0";
		document.getElementById("ico2").style.backgroundPosition = "-11px 0";
		document.getElementById("showHideTxt").innerHTML = "<a href=\"#\" onclick=\"javascript:ReverseDisplay('resultsBlock')\">Verberg Top 5 resultaten - Klik hier</a>";
	} else {
		document.getElementById(d).style.display = "none";
		document.getElementById("ico1").style.backgroundPosition = "0 0";
		document.getElementById("ico2").style.backgroundPosition = "0 0";
		document.getElementById("showHideTxt").innerHTML = "<a href=\"#\" onclick=\"javascript:ReverseDisplay('resultsBlock')\">Toon Top 5 resultaten - Klik hier</a>";
	}
}
//*************************************************//

