function toggleInfo(archiveId) {

	if ((document.getElementById('bookmarksLinks' + archiveId).style.display == 'block') || (document.getElementById('bookmarksLinks' + archiveId).style.display == '')){

		document.getElementById('bookmarksLinks' + archiveId).style.display = 'none';

		document.getElementById('icon' + archiveId).src = 'images/maximize.gif';

	}else{

		document.getElementById('bookmarksLinks' + archiveId).style.display = 'block';

		document.getElementById('icon' + archiveId).src = 'images/minimize.gif';

	}

}





function nologin(){

	alert('Du måste vara inloggad för att komma åt denna funktion.');

	return false;

}




var tld_ = new Array()
tld_[0] = "com";
tld_[1] = "org";
tld_[2] = "net";
tld_[3] = "se";
tld_[4] = "info";
tld_[10] = "co.uk";
tld_[11] = "org.uk";
tld_[12] = "gov.uk";
tld_[13] = "ac.uk";
var topDom_ = 13;
var m_ = "mailto:";
var a_ = "@";
var d_ = ".";

function mail(name, dom, tl, params)
{
	var s = e(name,dom,tl);
	document.write('<a href="'+m_+s+params+'">'+s+'</a>');
}
function mail2(name, dom, tl, params, display)
{
	document.write('<a href="'+m_+e(name,dom,tl)+params+'">'+display+'</a>');
}
function e(name, dom, tl)
{
	var s = name+a_;
	if (tl!=-2)
	{
		s+= dom;
		if (tl>=0)
			s+= d_+tld_[tl];
	}
	else
		s+= swapper(dom);
	return s;
}
function swapper(d)
{
	var s = "";
	for (var i=0; i<d.length; i+=2)
		if (i+1==d.length)
			s+= d.charAt(i)
		else
			s+= d.charAt(i+1)+d.charAt(i);
	return s.replace(/\?/g,'.');
}






function checkInputSearch3(form) {

	sWhatVal = form.searchURL.value;

	if ((form.q.value.length == 0) && ((sWhatVal == 0) || (sWhatVal == 1))) {

		alert("Du måste ange ett sökord för att genomföra en sökning!");

		return false;

	}

	if (sWhatVal == 0) {

		return true;

	}else if (sWhatVal == 1){

		if(form.gWhat[0].checked){

		window.open('http://www.google.se/custom?q=' + form.q.value + '&client=' + form.client.value + '&forid=' + form.forid.value + '&ie=' + form.ie.value + '&oe=' + form.oe.value + '&hl=' + form.h.value + '&channel=' + form.channel.value + '&meta=lr%3Dlang_sv');

		}else if(form.gWhat[1].checked){

			window.open('http://images.google.se/images?hl=sv&btnG=S%C3%B6k+bilder&q=' + form.q.value );

		}

		return false;

	}else if (sWhatVal == 2){

		window.open('http://www.hitta.se/ExternalSeach/Default.aspx?TextBoxWho=' + form.q.value + '&TextBoxWhere=' + form.where.value);

		return false;

	}else if (sWhatVal == 3){

	

		if(form.eniroS[0].checked){

			window.open('http://www.eniro.se/query?what=web&partnerid=generic&q=' + form.q.value );

		}else if(form.eniroS[1].checked){

			window.open('http://www.eniro.se/query?what=images&partnerid=generic&q=' + form.q.value );

		}else if(form.eniroS[2].checked){

			window.open('http://gulasidorna.eniro.se/query?what=yp&partnerid=generic&newSearch=1&search_word=' + form.q.value );

		}else if(form.eniroS[3].checked){

			window.open('http://privatpersoner.eniro.se/query?what=wp&partnerid=generic&stq=0&searchword=' + form.q.value );

		}



		return false;

	}

}





function swapS(sObj){

		document.getElementById('searchURL').value = sObj;



		document.getElementById('s0').style.display = 'none';

		document.getElementById('s1').style.display = 'none';

		document.getElementById('s2').style.display = 'none';

		document.getElementById('s3').style.display = 'none';

		document.getElementById('s' + sObj).style.display = 'block';



		document.getElementById('smenu0').style.background = '#3C86CC';

		document.getElementById('smenu0').style.color = '#fff';

		document.getElementById('smenu1').style.background = '#3C86CC';

		document.getElementById('smenu1').style.color = '#fff';

		document.getElementById('smenu2').style.background = '#3C86CC';

		document.getElementById('smenu2').style.color = '#fff';

		document.getElementById('smenu3').style.background = '#3C86CC';

		document.getElementById('smenu3').style.color = '#fff';

		

		document.getElementById('smenu' + sObj).style.background = '#fff';

		document.getElementById('smenu' + sObj).style.color = '#105797';

}





function gotoLink(id) {

		window.open('transport.asp?linkurlId=' + id);

		return false;

}



function gotoQLink(id) {

		if(id !=0){

			window.open('transport.asp?linkurlId=' + id);

			return false;

		}

}



function openTipWin(id, winH, winW) {

		window.open("tip.asp?linkurlId=" + id, "Popup", "height=" + winH + ",width=" + winW + ",titelbar=0,channelmode=0,screenX=0,left=30,screenY=0,top=30,hotkeys=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");

}



google_ad_client = "pub-7028808209518119";

google_ad_width = 468;

google_ad_height = 60;

google_ad_format = "468x60_as";

google_ad_type = "text";

google_ad_channel ="";

google_color_border = "FFFFFF";

google_color_bg = "FFFFFF";

google_color_link = "006590";

google_color_url = "008000";

google_color_text = "000000";

