/* Superen.nl Javascript
Erik Kramer 2007
*/

///////////////////////////////
// XMLHTTP object
var xmlhttp=false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

function doorlinken ( www )
{
  document.linkform.adres.value = www ;
  document.linkform.submit() ;
}

function hoogte(){
	if ((screen.width>=1024) && (screen.height>=768)){
	 document.getElementById('dynFrame').setAttribute('height','7%');
	}
	else{
	 document.getElementById('dynFrame').setAttribute('height','10%');
	}
}

function hoogte2(){
	if ((screen.width>=1024) && (screen.height>=768)){
	 document.getElementById('dynFrame2').setAttribute('height','93%');
	}
	else{
	 document.getElementById('dynFrame2').setAttribute('height','90%');
	}
}

function favoris() {
if ( navigator.appName != 'Microsoft Internet Explorer' )
{ window.sidebar.addPanel("Superen.nl","http://www.superen.nl/",""); }
else { window.external.AddFavorite("http://www.superen.nl/","Superen.nl"); } }

function blinkOn(){

        theWin.document.bgColor = "43da38"

        nTimes++

        JSCTimeOutID = window.setTimeout("blinkOff()",400);

}

function blinkOff(){

        theWin.document.bgColor = "FFFFFF"

        if (nTimes < 1){
                JSCTimeOutID = window.setTimeout("blinkOn()",200); }

}

function blinkit(aWin)

{

        nTimes = 0

        theWin = aWin

        JSCTimeOutID = window.setTimeout("blinkOn()",3000);

}

function meldBrokenLink(www){

var answer = confirm("U staat op het punt te melden dat de link "+ www +" niet meer juist is."+'\n'+"Wilt u doorgaan?");
if (answer){
	var url="brokenLink.php?www="+www;

	xmlhttp.open("GET", url,true);
	xmlhttp.setRequestHeader("Cache-Control", "no-cache");
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			alert("Bedankt voor uw melding. Er wordt z.s.m. naar gekeken.");
		}
	}
	xmlhttp.send(null);
}
}

