﻿/* Wanneer iemand de site kwaadwillig in een iframe laadt, springt hij er weer uit */

if (top.location!= self.location) {
top.location = self.location.href 
}

/* Script om een Bookmark te realiseren */

function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

function openplayer() {
window.open('/player/', 'player', 'menubar=0,resizable=1,width=490,height=390');
}

function checkcontact( form )
{

	if (form.naam.value == "") {
    alert( "Please, fill in your name" );
    form.naam.focus();
    return false ;
  }

	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)) {}
	else{
    alert( "Please, fill in a valid e-mailaddress!" );
    form.email.focus();
    return false ;
  }

	if (form.bericht.value.length < 10) {
    alert( "Your message is too short!" );
    form.bericht.focus();
    return false ;
  }  

return true ;
}

function CheckAddlink( form )
{
	if (/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{2}/.test(form.link.value)) {}
	else{
    alert( "Please, fill in a valid URL!" );
    form.link.focus();
    return false ;
    }

	if (form.email.value != "") {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)) {}
		else{
	    alert( "Please, fill in a valid e-mailaddress or leave it empty!" );
	    form.email.focus();
	    return false ;
		}
    }

	if (form.oms.value == "") {
    alert( "Please, fill in a title for your URL." );
    form.oms.focus();
    return false ;
    }
return true ;
}


function gastenboek( form )
{

  if (form.naam.value == "") {
    alert( "Please, fill in your name!" );
    form.naam.focus();
    return false ;
  }  

  if (form.email.value != "") {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)) {}
	else{
    alert( "Please, fill in a valid e-mailaddress or leave it empty!" );
    form.email.focus();
    return false ;
   }
  }  
	
  if (form.bericht.value == "") {
    alert( "The messagefield is empty." );
    form.bericht.focus();
    return false ;
  }

return true ;
}



function icon(ico) {
  document.form.bericht.value += ico;
  document.form.bericht.focus();
}


/* LINKPARTNERS */

function checklpnew( form )
{

	if (/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{2}/.test(form.lp_url.value)) {}
	else{
    alert( "Please, fill in a valid URL!" );
    form.lp_url.focus();
    return false ; 
   }  

	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.lp_contact.value)) {}
	else{
    alert( "Please, fill in a valid e-mailaddress!" );
    form.lp_contact.focus();
    return false ;
  }
	
  if (form.lp_url_desc.value == "") {
    alert( "Please, fill in a valid description of your URL." );
    form.lp_url_desc.focus();
    return false ;
  }  	 
  
  if (form.lp_url.value == "") {
    alert( "Please, fill in a valid URL" );
    form.lp_url.focus();
    return false ;
  }
return true ;
}

function out(nr){
window.open("/partners/out.php?id="+nr+"", "intern");
}

function highlightByName(n) {
	document.getElementsByName(n)[0].select();
}