var bugRiddenCrashPronePieceOfJunk = (navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1);

var W3CDOM = (!bugRiddenCrashPronePieceOfJunk && document.getElementsByTagName && document.createElement);

if ((top != self.parent) && (!top.hoofd.zoekscherm) && !self.disabled) {
   top.location.href = '/index.htm?p=' + location.pathname;
}

function zoeken() {
	var zoekpagina = "zoekresultaten.htm?id=";
	var startlink = "http://www.google.com/search?q=";
	var eindelink = "&domains=www.ice-x.nl&sitesearch=www.ice-x.nl";
	var vraag =  document.formzoek.inputzoek.value;
	top.frames['hoofd'].document.location.href = startlink + vraag + eindelink;
}

function clearText(thefield) {
	if (thefield.defaultValue==thefield.value) thefield.value = "";
} 
function unclearText(thefield) {
	if(thefield.value == "") thefield.value = thefield.defaultValue;
} 

function validateaan() {
	if(emailaanmelden.emailaan.value == "") {
		alert("Wilt u alstublieft een emailadres invullen? Hartelijk dank!");
		emailaanmelden.emailaan.focus();
		return false;
	}	
	if(emailaanmelden.emailaan.value.indexOf('@')<1)
	{
		alert("Sorry, dit is geen geldig emailadres.");
		emailaanmelden.emailaan.focus();
		return false;
	}
	return true;
}

window.onload = initialize; 

function initialize () {

window.status = "";

/* Put page within frames */

//	if (top.hoofd.zoekframe && !top.hoofd.zoekframe.document.location.href.indexOf("?hl")) {
//		top.hoofd.document.location.href = top.hoofd.zoekframe.document.location.href;
//	}
	if (!top.hoofd) top.location.href = 'http://www.ice-x.nl/index.htm?p=' + location.pathname;
	if (self.init) self.init();

/* Place footer */

   var einde = '';
   einde += '<H1>Ice-X (www.ice-x.nl)</H1>';
   einde += '<P class="footertext">Page last updated '+ document.lastModified +'<br/>'; 
   einde += 'Webhosting by Dominion<br/><br/>';

   copyright=new Date();
   update=copyright.getFullYear();

   einde += 'Copyright © 2000-' + update + ' Stichting Ice-X<br/><br/>';
   einde += '<P class="center">Ice-X.nl voor alle info over expedities van Ice-X<br/>naar Kurumdi, Peak Lenin, de Seven Summits Kilimanjaro, Aconcagua en Elbrus<br/>en diverse arctische ATB expedities.<br/><br/>Webdesign by <span class="footer"><a onFocus="blur(this)" href="http://www.krielen.com/" title="Krielen.com Webdesign [www.krielen.com]" target=_blank>Krielen.com Webdesign</a></span></P>';

   if (document.getElementById('footer')) {
   	  document.getElementById('footer').innerHTML += einde;
   }

   if (document.getElementById('footer_en')) {
   	  document.getElementById('footer_en').innerHTML += einde;
   }

/* Place header */

   var begin = '';
   begin += '<A name="top"></A>';
   begin += '<H1>Stichting Ice-X</H1>';
   begin += '<H1 class="sub">'+ document.title +'</H1>';

   windowHeight = document.body.clientHeight;
   
   begin += '<div id="zoekbox">';
   begin += '	<form name="formzoek" id="formzoek" action="javascript:zoeken();">';
   begin += '		<fieldset>';
   begin += '			<input class="txt" type="text" value=" zoek op de site met Google" name="inputzoek" onClick="clearText(this);" onBlur="unclearText(this);" />';
   begin += '			<input class="sbmt" type="button" title="zoek" value="" onClick="zoeken();" />';
   begin += '		</fieldset>';
   begin += '	</form>';
   begin += '</div>';

   begin += '<div id="mailbox">';
   begin += '	<A href="http://www.ice-x.nl/contact.php" target="hoofd"><IMG align="right" src="http://www.ice-x.nl/images/pictogrammen/mail.gif" alt="contactformulier" width="34" height="37" border="0"/></A>';
   begin += '</div>';

   if (document.getElementById('header')) {
   	  document.getElementById('header').innerHTML += begin;
   }

   if (document.getElementById('header_en')) {
   	  document.getElementById('header_en').innerHTML += begin;
   }

/* end */
}

function namen() {
	alert(' ---------------------------------------- \n I = Ice-X totaal \n P = Peter-Arjen Boers \n R = Ramon Sijmons \n F = Frank Haagsma \n B = Boris Krielen \n\n • = beklimming, top bereikt \n ¤ = poging, top niet bereikt \n ---------------------------------------- ');
}

function bgOn(id) {
	id.style.background = 'gold';
}
function bgOff(id) {
	var oldcolor = (id.className == 'regelblauw') ? ('#B0D0EE') : ('');
	id.style.background = oldcolor;
}
