//---------------------------------------------------------------------------------------------------------------------
// SCRIPTS LADEN
//---------------------------------------------------------------------------------------------------------------------

		function scriptsladen_onload() 
		{ 
			plaats_computer_div();
			correctPNG(); 
			alphaBackgrounds();
		} 
		function scriptsladen_onresize() 
		{ 
		} 
		window.onresize = scriptsladen_onresize;		
		window.onload = scriptsladen_onload;
		
//---------------------------------------------------------------------------------------------------------------------
// EINDE SCRIPTS LADEN
//---------------------------------------------------------------------------------------------------------------------
	
	function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;
      }

	function goThere()
	{
		var list		= document.forms[0].periode
		location		= "prijzen.php?page=prijzen&periode="+list.options[list.selectedIndex ].value
	}
	function plaats_computer_div()
	{	
		// browser ophalen
		var non_IE 											= (typeof( window.innerWidth ) == 'number');
		var IE_6 											= (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ));
		var IE_4 											= (document.body && ( document.body.clientWidth || document.body.clientHeight ));
			
		if( non_IE )
		{
			//Non-IE
			add_FF_height									= 0;
			bodyheight 										= window.innerHeight;
			//alert ("geen IE");
		} 
		else if( IE_6 ) 
		{
			//IE 6+ in 'standards compliant mode'
			add_FF_height									= 0;
			bodyheight 										= document.documentElement.clientHeight;
			//alert ("IE 6+");
		} 			
		else
		{
			//IE 4 compatible
			add_FF_height									= 0;
			bodyheight 										= document.body.clientHeight;
			//alert ("IE 4+");
		}
		
		var ypos				= document.getElementById('bon').clientHeight;
		var new_ypos			= ypos - 287 + add_FF_height; // minus footer
		var new_ypos_empty		= bodyheight - 228 + add_FF_height; // minus footer
		//alert (new_ypos);
		if (document.getElementById('computer'))
		{
			if (new_ypos >= 443)
			{
				document.getElementById('computer').style.top = new_ypos + 'px';
			}
			else
			{
				document.getElementById('bon').style.height = 730 + 'px';
			}
		}
		else
		{
			document.getElementById('bon').style.height = new_ypos_empty + 'px';
		}
	}
	function tel(aantaltekens) 
	{
		var aantal_tekens = aantaltekens;
		var waarde = document.shoutcast.sc_message.value;
		document.shoutcast.teller.value = aantal_tekens - waarde.length;		
	}
	
//---------------------------------------------------------------------------------------------------------------------
// PAGINALINK
//---------------------------------------------------------------------------------------------------------------------

		function paginalink(theURL,winName) 
		{ //v2.0
			window.open(theURL,winName);
		}

//---------------------------------------------------------------------------------------------------------------------
// EINDE PAGINALINK
//---------------------------------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------------------------------
// PNG FIX
//---------------------------------------------------------------------------------------------------------------------

		var strGif = "/shared/img/spacer.gif"
		var strFilter = "progid:DXImageTransform.Microsoft.AlphaImageLoader"
		var arVersion = navigator.appVersion.split("MSIE")
		var version = parseFloat(arVersion[1])
		
		function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
		{
		   var arVersion = navigator.appVersion.split("MSIE")
		   var version = parseFloat(arVersion[1])
		   if ((version >= 5.5) && (document.body.filters)) 
		   {
			  for(var i=0; i<document.images.length; i++)
			  {
				 var img = document.images[i]
				 var imgName = img.src.toUpperCase()
				 if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
				 {
					var imgID = (img.id) ? "id='" + img.id + "' " : ""
					var imgClass = (img.className) ? "class='" + img.className + "' " : ""
					var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
					var imgStyle = "display:inline-block;" + img.style.cssText 
					if (img.align == "left") imgStyle = "float:left;" + imgStyle
					if (img.align == "right") imgStyle = "float:right;" + imgStyle
					if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
					if (img.useMap)
					  {  
						 strAddMap = "<img style=\"position:relative; left:0px; top:-" + img.height + "px;"
						 + "height:" + img.height + "px;width:" + img.width +"\" "
						 + "src=\"" + strGif + "\" usemap=\"" + img.useMap 
						 + "\" border=\"" + img.border + "\">"
					  }
					var strNewHTML = "<span " + imgID + imgClass + imgTitle
					+ " style=\"" + " width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
					+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
					if (img.useMap) strNewHTML += strAddMap
					img.outerHTML = strNewHTML
					i = i-1
				 }
			  }
		   }    
		}
		
		function findImgInputs(oParent)
		{
		   var oChildren = oParent.children
		   if (oChildren)
		   {
			  for (var i=0; i < oChildren.length; i++ )
			  {
				 var oChild = oChildren(i)
				 if ((oChild.type == 'image') && (oChild.src))
				 {
					 var origSrc = oChild.src
					 oChild.src = strGif
					 oChild.style.filter = strFilter + "(src='" + origSrc + "')"
				 }
				 findImgInputs(oChild)
			  }
		   }
		}
		
		function alphaBackgrounds() // correctly handle PNG "BACKGROUNDCOLOUR" transparency in Win IE 5.5 or higher.
			{
			var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
			var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
			
			var td = document.getElementsByTagName("td");
			for (var i = 0; i< td.length; i++)
			{
				if (itsAllGood)
				{
					var bg = td[i].currentStyle.backgroundImage;
					if (bg.match(/\.png/i) != null)
					{
						var mypng = bg.substring(5,bg.length-2);
						td[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
						td[i].style.backgroundImage = "url('/shared/img/spacer.gif')";
					}
				}
			}
			
			var div = document.getElementsByTagName("div");
			for (var i = 0; i< div.length; i++)
			{
				if (itsAllGood)
				{
					var bg = div[i].currentStyle.backgroundImage;
					if (bg.match(/\.png/i) != null)
					{
						var mypng = bg.substring(5,bg.length-2);
						div[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
						div[i].style.backgroundImage = "url('/shared/img/spacer.gif')";
					}
				}
			}
		}

//---------------------------------------------------------------------------------------------------------------------
// EINDE PNG FIX
//---------------------------------------------------------------------------------------------------------------------