//<![CDATA[
/*
@file   common.scripts.js
@short  a collection of usefull (?) javascript functions
@author Paul Hendriks
@date   03/jan/2008
*/

function trimString (str)
	{
	str = this != window? this : str;
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
	}

function bookMarkUs ( MetName )
	{
	if(document.all) 
		window.external.AddFavorite("http://"+window.location.hostname, MetName);
	else if (window.sidebar) 
		window.sidebar.addPanel(MetName, "http://"+window.location.hostname, "");
	}

function mail(to, at, dot)
	{
	window.location = "mailto:"+to+"@"+at+"."+dot;
	}

function selVerzekering ()
	{
	document.location.href = 'http://www.ipolis.nl/' + document.getElementById('sel_verzekeringen').value;
	}

// Function that shows / hides faq-div's.
// PHE 14/08/2007
var vorigeFaqNr = 1;
//document.getElementById('1').style.display = 'block';

function showFaq (nr)
	{
	//alert (document.getElementById(nr).style.display);
	if (vorigeFaqNr!=0)
		{
		document.getElementById(vorigeFaqNr).style.display = 'none';
		document.getElementById('h' +vorigeFaqNr).className = 'faq';
		document.getElementById('li' +vorigeFaqNr).className = 'faq';
		}

	document.getElementById(nr).style.display = 'block';
	document.getElementById('h'+nr).className = 'faqSelected';
	document.getElementById('li'+nr).className= 'liSelected';
	vorigeFaqNr = nr;
	}

var vorigeAbc = 'a';
//document.getElementById('1').style.display = 'block';

function showAbc (abc)
	{
	//alert (document.getElementById(nr).style.display);
	if (vorigeAbc!='')
		{
		document.getElementById(vorigeAbc).style.display = 'none';
		document.getElementById('h' +vorigeAbc).className = 'abc';
		}

	document.getElementById(abc).style.display = 'block';
	document.getElementById('h'+abc).className = 'abcSelected';
	vorigeAbc = abc;
	}
	
	
// ]]>

