<!-- Browser detection ------------------------------------------------- -->

intIEversion = -1; 
if (navigator.appName == 'Microsoft Internet Explorer')
{
   var ua = navigator.userAgent;
   var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
   if (re.exec(ua) != null)
      intIEversion = parseFloat( RegExp.$1 );
}
IE = (intIEversion > -1);

<!-- Including scripts for menu, scrolling and image handling ---------- -->

document.write('<script type="text/javascript" ');
document.write('src="../Scripts/scriptFlexcroll.js"></script>');

<!-- Don't forget to set in Scripts/Highslide/highslide.config.js        -->
<!--    hs.graphicsDir = '../Scripts/Highslide/graphics/';               -->
<!--    hs.lang.restoreTitle: '' 										 -->
<!--    hs.dimmingOpacity = 0.6; 										 -->
<!--    hs.dimmingDuration = 200; 										 -->
<!-- and other settings ad lib.											 -->
<!-- Also, don't forget to set in Scripts/Highslide/highslide.css 		 -->
<!-- under "Settings added by the editor" near the bottom of the file 	 -->
<!--    .highslide-image {border: 5px solid #FFFFFF} 	  	 	 		 -->
<!-- instead of the default 10px border. 								 -->
<!-- To redesign the Highslide behaviour use the online 				 -->
<!-- Highslide Editor. 		   			 	 	 						 -->

document.write('<script type="text/javascript" ');
document.write('src="../Scripts/Highslide/highslide-full.js"></script>');
document.write('<script type="text/javascript" ');
document.write('src="../Scripts/Highslide/highslide.config.js" ');
document.write('charset="utf-8"></script>'); 
document.write('<link rel="stylesheet" type="text/css" ');
document.write('href="../Scripts/Highslide/highslide.css">');
document.write('<!--[if lt IE 7]>');
document.write('   <link rel="stylesheet" type="text/css" ');
document.write('         href="../Scripts/Highslide/highslide-ie6.css">');
document.write('<![endif]-->');

<!-- Adjusting to various screen sizes, iPad and iPhone ---------------- --> 

booHighslide = true;
if ((IE) && (intIEversion < 9) && (screen.width < 1000))
{
   document.write('<link rel="stylesheet" type="text/css" ');
   document.write('href="../Stylefiles/stylefile_centre_off.css">') 
}    
if (screen.width < 481)
{
   document.write('<meta name="viewport" ');
   document.write('content="width=device-width">');
   booHighslide = false;
}
if ((screen.width > 480) && (screen.width < 769))
{   
   booHighslide = false;
}
   
<!-- Help functions ---------------------------------------------------- -->

function CleanString(str)
{
   str = str.replace(/%20/g,' ');
   if (IE)
      str = str.replace(/\//g,'\\');
   return str;		 
}   

function Email()
{
   document.write('<a class="textlink" ');
   document.write('href="mailto:info@vocaalensemblekerkrade.nl" ');
   document.write('title="Klik om te mailen">');
   document.write('<span class="tl">info@vocaalensemblekerkrade.nl');
   document.write('</span></a>');
}

function Tel(strName)
{
   switch (strName)
   { 
      case "Elice Ligter":    strTel = "00 31 (0)45 850 1583"; break;
      default: 	  			  strTel = "telefoonnummer onbekend";
   }	  
   document.write(strTel);
}	

function MakeImage(strImage, strAlt)
{
   if (booHighslide)
   {
      document.write('<a href="../Images/Right/Large/' + strImage + '" ');
      document.write('class="highslide" onclick="return hs.expand(this)">');
   }	
}

function EndImage()
{     
   if (booHighslide) document.write('</a>');  
}

function YouTubeHS(obj)
{
   if (booHighslide)
	  return hs.htmlExpand(obj, 
             {objectType: 'iframe', width: 480, height: 385, 
                          allowSizeReduction: false, 
					      wrapperClassName: 'no-footer', 
                          preserveContent: false, objectLoadTime: 'after'});
   else
      return true;		  				  
}

function YouTubeHrefJs()
{
   links = document.getElementsByTagName('a');
   youtubelinks = new Array();
   for (i = 0; i < links.length; i++)
	  if ((links[i].className == 'highslide') && 
		  (links[i].target == 'VEK'))
		 youtubelinks[youtubelinks.length] = links[i];	
   for (i = 0; i < youtubelinks.length; i++)
   {
	  if (booHighslide)
	  {
	     strHref = youtubelinks[i].href;
		 strHrefJs  = 'http://www.youtube.com/embed/';
         strHrefJs += strHref.substring(strHref.indexOf('=') + 1);
         strHrefJs += '?rel=0';
		 youtubelinks[i].href = strHrefJs;
      }
	  else
	     youtubelinks[i].className = 'textlink';
   }	
     
}

window.onfleXcrollRun=function()
{ 
   // Code that runs after Flexcroll started. 
   document.getElementById("CheckStat").src = strSrc;
}

function CheckStat(a,v)
{
   var set = new Array();
   if ( typeof v == "string")
      set[0] = parseInt(v.substring(0,1));
   else
      set[0] = (v == 3 || v == 4) ? 0 : 1;
   
   var jv, sz, sc, i;
   js = "";
   
   var td = new Date();
   var tm = td.getTime();
   var s = screen;
   var d = document;
   var l = "http://checkstat.nl/cgi-bin/";
   var lo = d.URL;
   var n = navigator;
   var re = typeof(top.document) == "object" ?
            top.document.referrer : d.referrer;
   
   for (i = 0; i <= 5; i++)
   {
      d.write('<script language="javascript1.' + i + '">');
	  d.write('js="' + i + '"<\/script>');
   }
   if (js >= 1)
      jv = n.javaEnabled() ? "y" : "n"
   if (js >= 2)
   {
      sz = s.width + "*" + s.height;
      sc = n.appName.substring(0,9)=="Microsoft" ? 
	       s.colorDepth : s.pixelDepth;
   }
   var ar = "&location=" + escape(lo) + "&screensize=" + sz;
   ar += "&screencolors=" + sc + "&javascript=1." + js;
   ar += "&java=" + jv + "&referrer=" + escape(re) + "&time="+ tm;
   if (set[0])
   {
      d.write('<a target="VEK" href="' + l + 'show.cgi?' + a + '">');
	  d.write('<img class="imagestats" alt="CheckStat" ');
	  d.write('title="webstatistieken" id="CheckStat" ');
	  d.write('src="../Images/Icons/checkstat.gif"><\a>');
	  // Replaced with the line above to hide Flexcroll delay.
	  // d.write('src="' + l + 'count.cgi?' + a + ar + '"><\a>');
   }
   else
   {
      d.write('<img width=1 height=1 alt="CheckStat" ');
	  d.write('title="webstatistieken" id="CheckStat" ');
	  d.write('src="../Images/Icons/checkstat.gif"><\a>');
	  // Replaced with the line above to hide Flexcroll delay.
	  // d.write('src="' + l + 'count.cgi?' + a + ar + '">');
   }
   strSrc = l + 'count.cgi?' + a + ar;
}



