var loaded  = "yes";
var ua		= navigator.userAgent;
var opera	= /opera [56789]|opera\/[56789]/i.test(ua);
var ie		= !opera && /msie [56789]/i.test(ua);		// preventing opera to be identified as ie
var moz		= !opera && /mozilla\/[56789]/i.test(ua);	// preventing opera to be identified as mz

	function rlogo(ordernumber,van)
	{
	 window.open('http://www.vote4me.nl/send.php?item='+ordernumber+'&type=logo&pos='+van,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=468,height=468,left='+eval((screen.availWidth/2)-234)+',top=50');
	}
	function mobileeditor(contenttype, data, pos)
	{
	 mmrefname = 'v4m';
	 mmlanguage = 'nl';
	 mmpskin = ''
	 mmdata = data
	 
	 
	 switch (contenttype*1) {
	   case 16:
	   case 19:
	   	screenwidth = 520;
	   	screenheight = 300;
	   	break;
	   case 17:
	   	screenwidth = 520;
	   	screenheight = 400;
	   	break;						
	   case 15:
	   	screenwidth = 575;
	   	screenheight = 505;
	   	break;
	}
 
	 window.open('http://www.mobilemoney.biz/editor.asp?contenttype='+escape(contenttype)+'&refname='+escape(mmrefname)+'&mmdata='+escape(mmdata)+'&language='+escape(mmlanguage)+'&popupskin='+escape(mmpskin),'editorpopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+screenwidth+',height='+screenheight+',left='+eval((screen.availWidth/2)-234)+',top=50');

	}
	function pagina(page) {
		waarde = (page * 50) - 50;
		document.next.van.value = waarde;
		document.next.page.value = page;
		document.next.submit();
	}
	function orderby(wat) {
		document.next.orderby.value = wat;
		document.next.submit();
	}
	function show(wat) {
		document.next.show.value = wat;
		document.next.van.value = 0;
		document.next.submit();
	}
	function changeValue(waarde) {
		document.zoekForm.zoekop.value = waarde;
		return true;
	}
	function submitForm() {
		document.next.page.value = 0;
		document.next.van.value = 0;
		document.next.submit();
		return true;
	}
	function vote(watte) { 
		document.voteForm.wat.value = watte;
		document.voteForm.submit();
	}
	function smsboard(naam){
	window.open('http://www.vote4me.nl/sms.php?naam='+ naam,'sms','width=300, height=200');
	}
	
	function addbookmark()
	{
	bookmarkurl="http://www.vote4me.nl"
	bookmarktitle="Vote4Me, online jongeren community."
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
	}
	
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}

function logout(){
if(confirm("Weet je zeker dat je nu wilt uitloggen?")){
SetCookie("STAY_LOGGED_IN","no");
document.location.href='http://www.vote4me.nl/actions/logout?STAY_LOGGED_IN=no';
}
}

function helpform()
{
 mmrefname = 'v4m';
 mmlanguage = 'nl';
 window.open('http://www.mobilemoney.biz/salespopup.asp?refname='+mmrefname+'&language='+mmlanguage+'&action=help','popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=468,height=550,left='+eval((screen.availWidth/2)-234)+',top=50');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function close_ad(){
document.all.closer.style.display = "none";
document.all.wind.style.display = "none";
}