function fEScr(e, u, d)
{
	at = '&#64;';
	dot = '&#46;';
	document.write('<a ');
	document.write('href=\"mailto');
	document.write(':');
	document.write(u);
	document.write(at);
	document.write(d);
	document.write(dot);
	document.write(e);
	document.write('\">');
	document.write(u);
	document.write(at);
	document.write(d);
	document.write(dot);
	document.write(e);
	document.write('</a>');
}

function fEScr2(e, u, d, l)
{
	at = '&#64;';
	dot = '&#46;';
	document.write('<a ');
	document.write('href=\"mailto');
	document.write(':');
	document.write(u);
	document.write(at);
	document.write(d);
	document.write(dot);
	document.write(e);
	document.write('\">');
	document.write(l);
	document.write('</a>');
}

function ContactSubmit()
{
	var sError = "";
			
	if (document.frmContact.f_s_voornaam.value == ""){sError = sError + "- Voornaam\n";}
	if (document.frmContact.f_s_achternaam.value == ""){sError = sError + "- Achternaam\n";}
	if (document.frmContact.f_s_email.value == ""){sError = sError + "- E-mail\n";}
	if (document.frmContact.f_s_opmerking.value == ""){sError = sError + "- Opmerking\n";}
											
	if (sError == "")
	{
		document.frmContact.submit();	
	}
	else
	{
		alert ("De volgende velden zijn niet ingevuld:\n\n" + sError);
	}
}

function GuestbookSubmit()
{
	var sError = "";
			
	if (document.frmGuestbook.f_s_naam.value == ""){sError = sError + "- Naam\n";}
	if (document.frmGuestbook.f_s_bericht.value == ""){sError = sError + "- Bericht\n";}
											
	if (sError == "")
	{
		document.frmGuestbook.submit();	
	}
	else
	{
		alert ("De volgende velden zijn niet ingevuld:\n\n" + sError);
	}
}

function goGB(){
	location.href = 'gastenboek_teken.asp'
}

function AddLinkSubmit()
{
	var sError = "";
			
	if (document.frmAddLink.f_s_voornaam.value == ""){sError = sError + "- Voornaam\n";}
	if (document.frmAddLink.f_s_achternaam.value == ""){sError = sError + "- Achternaam\n";}
	if (document.frmAddLink.f_s_email.value == ""){sError = sError + "- E-mail\n";}
	if (document.frmAddLink.f_s_wnaam.value == ""){sError = sError + "- Naam website\n";}
	if (document.frmAddLink.f_s_url.value == ""){sError = sError + "- Url\n";}
	if (document.frmAddLink.f_s_linkscat.value == ""){sError = sError + "- Categorie\n";}
											
	if (sError == "")
	{
		document.frmAddLink.submit();	
	}
	else
	{
		alert ("De volgende velden zijn niet ingevuld:\n\n" + sError);
	}
}

function goLinks(){
	location.href = 'links_teken.asp'
}

function goContact(){
	location.href = 'contactus.asp'
}

function MailWebmaster()
{
	emailE=('webmaster@' + 'motorclubwehl.nl')	
	document.write(
		'<A href="mailto:' + emailE + '">' 
		+ emailE + '</a>'
	)
}

function MailBuitenlandrit()
{
	emailE=('h.jansen85@' + 'chello.nl')	
	document.write(
		'<A href="mailto:' + emailE + '">' 
		+ emailE + '</a>'
	)
}

function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}

function bookmarksite(title,url){
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
		window.external.AddFavorite(url, title);
}

function setAsHome(myLink){
	if(navigator.appName.indexOf('Microsoft')!=-1){
		// IE
		myLink.style.behavior='url(#default#homepage)';
		myLink.setHomePage(location.href);
	}
	else if(navigator.appName.indexOf('Netscape')!=-1){
		// Netscape / firefox browsers
		var msg = "Just drag this link onto your 'home' ";
		msg += "button to set this page as your ";
		msg += "default homepage!";
		alert(msg);
	}
	else if(navigator.appName.indexOf('Opera')!=-1){
		// Opera
		var msg = "Please go to Tools - Preferences ";
		msg += "- General and click 'Use current' ";
		msg += "to set this as your homepage! ";
		alert(msg);
	}
	else{
		// Other browsers
		var msg = "Sorry, your browser doesn't allow ";
		msg += "scripts to set the default homepage. ";
		msg += "Please use your browser's 'options' dialog ";
		msg += "to do it! Thank you for your patience. ";
		alert(msg);
	}
}

function AddsmileysyIcon(iconCode){
	frmGuestbook.f_s_bericht.value += iconCode + " ";
}

function AddsmileysyIconPopup(iconCode) {	
	window.opener.document.frmGuestbook.f_s_bericht.value += iconCode + " ";
}

function openWin(theURL,winName,features){
	window.open(theURL,winName,features);
}

function hidestatus(){ 
window.status='' 
return true 
} 

if (document.layers) 
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT) 

document.onmouseover=hidestatus 
document.onmouseout=hidestatus 

