function runS(jsdrop, subsite){
	ssel = document.getElementById('site_selector');
  	ddown = document.getElementById('dropdownmenu');

      	if (ssel != null && ddown != null && jsdrop) {
    		s = '<div><img src="/lb/logo_nu_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nu.nl/">NU.nl</a> </div> <div><img src="/lb/logo_nuzakelijk_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nuzakelijk.nl/nuzakelijk/">NUzakelijk</a></div> <div><img src="/lb/logo_nusport_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nusport.nl/nusport/">NUsport</a></div> <div><img src="/lb/logo_nutvgids_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nusport.nl/tvgids/">NUtvgids</a></div> <div><img src="/lb/logo_nuvideo_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nuvideo.nl/">NUvideo</a></div> <div><img src="/lb/logo_nufoto_nl13.gif" />  <a style="text-decoration:none;" href="http://mobiel.nu.nl/foto/">NUfoto</a></div> <div><a style="text-decoration:none;" href="#" onclick="hidedropdown()">sluiten</a></div>';
  		ddown.innerHTML = s;
  		ddown.style.display='none';
		ddown.style.border = "solid 1px #000000";
		ddown.style.backgroundColor="white";
		ddown.style.position="absolute";
		ddown.style.top="60px";
		ddown.style.right="0px";
		ddown.style.display="none";

    		s = '<img src="/lb/logo_'+subsite+'_nl13.gif" /> <a href="#" onclick="showdropdown()">'+displaySubSite(subsite)+'</a> <img src="http://nuimages.wapag.nl/arrow_down.gif" />';
		ssel.style.border = "solid 1px #000000";
    		ssel.innerHTML = s;

	} else if (ssel != null) {  	
    		s = '<select onchange="location.href=\'http://\'+this.value"><option '+isSelected(subsite, 'nu')+' value="mobiel.nu.nl/">NU.nl</option><option '+isSelected(subsite, 'nuzakelijk')+' value="mobiel.nuzakelijk.nl/nuzakelijk/">NUzakelijk</option><option '+isSelected(subsite, 'nusport')+' value="mobiel.nusport.nl/nusport/">NUsport</option><option '+isSelected(subsite, 'nutvgids')+' value="mobiel.nu.nl/tvgids/">NUtvgids</option><option '+isSelected(subsite, 'nuvideo')+' value="mobiel.nuvideo.nl/">NUvideo</option><option '+isSelected(subsite, 'nuvideo')+' value="mobiel.nu.nl/foto">NUfoto</option></select>';
    		ssel.innerHTML = s;
  	}
}

function isSelected(realS, checkS) {
	if (realS == checkS) return 'selected';
 	return '';
}

function displaySubSite(subs) {
	if (subs == 'nu') return 'NU.nl';
	return subs.replace('nu', 'NU');
}
function showdropdown() {
	document.getElementById('site_selector').style.visibility='hidden';
	document.getElementById('dropdownmenu').style.display='block';
}

function hidedropdown() {
	document.getElementById('site_selector').style.visibility='visible';
	document.getElementById('dropdownmenu').style.display='none';
}

