/*

(C)Copyright 2006-2008, Brian Sporkslede for Muzer

*/

function popup(url,w,h) {
	window.open(url, '_blank', 'width='+w+', height='+h+', toolbar=0, scrollbars=1, location=0, status=0, menubar=0, resizable=0, screenX=' + ((screen.width - w) / 2) + ', screenY=' + ((screen.height - h) / 2) + ', top=' + ((screen.height - h) / 2) + ', left=' + ((screen.width - w) / 2) + '')
}

function mailProtect(username,domainname,message)
{
	if ( message.length == 0 ) message = username + "@" + domainname;
	document.write('<a class="mailprotect" href="mailto:' + username  + '@' + domainname +'">' + message + '</a>' + '\n');
}

// the code below is from some website

function GetParam(name)
{
	var start=location.search.indexOf("?"+name+"=");
	if (start<0) start=location.search.indexOf("&"+name+"=");
	if (start<0) return '';
	start += name.length+2;
	var end=location.search.indexOf("&",start)-1;
	if (end<0) end=location.search.length;
	var result='';
	for(var i=start;i<=end;i++) {
	var c=location.search.charAt(i);
	result=result+(c=='+'?' ':c);
	}
	return unescape(result);
}

if( ! String.prototype.startsWith )
{
	String.prototype.startsWith = function (str) {
		return ! this.indexOf( str );
	}
}

if ( ( navigator.userAgent.match( /iPhone/i ) )
  || ( navigator.userAgent.match( /iPod/i ) ) )
{
	if ( window.location.href.indexOf( "http://www." ) == 0 )
	{
		window.location="http://m.zangles.nl";
	}
}
