function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function change1(picName,imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + ".src");
      document[picName].src= imgOn;
    }
 }
 
//preload image function
var myimages=new Array()
function preloadimages()
{
	for (i=0;i<preloadimages.arguments.length;i++)
	{
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
	}
}
//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
preloadimages("images/home_hover.jpg","images/practice_areas_hover.jpg","images/lawyer_hover.jpg","images/contact_hover.jpg","images/news_hover.jpg");

function imglarg(url, w, h, scroll)
{
	window.open(url,'popupbigimg','width='+w+',height='+h+',toolbar=no,menubar=no,statusbar=no,scrollbars='+scroll+',top=100,left=200,resizable=yes');
} 

function header(argument)
{
	document.write('<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.write('	<tr>');
	document.write('		<td height="15"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('</table>');
	document.write('<table cellpadding="0" cellspacing="9" width="780" class="bgdarkgray" border="0">');
	document.write('	<tr>');
	document.write('		<td class="bgblue" height="64">');
	document.write('			<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.write('				<tr>');
	document.write('    				<td width="50%"><a href="../index.htm"><img src="../images/logo.jpg" width="391" height="64" border="0"></a></td>');
	if (argument=='flag'){
		document.write('				<td width="50%" align="right" valign="bottom"><a href="../swedish/index.htm"><img src="../images/flag_swedish.jpg" alt="Svenska" width="33" height="19" border="0"></a><img src="../images/blanker.gif" width="20" height="1" border="0"><a href="../spanish/index.htm"><img src="../images/flag_spanish.jpg" alt="Espaņol" width="33" height="19" border="0"></a><img src="../images/blanker.gif" width="20" height="1" border="0"><a href="../english/index.htm"><img src="../images/flag_english.jpg" alt="English" width="33" height="19" border="0"></a><img src="images/blanker.gif" width="10" height="1" border="0"><br><img src="../images/blanker.gif" width="140" height="10" border="0">');
	}else{
		document.write('				<td width="50%">&nbsp;</td>');
	}
	document.write('					</td></tr>');
	document.write('			</table>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('</table>');	
	document.write('<table cellpadding="0" cellspacing="0" width="780" border="0">');
	document.write('	<tr>');
	document.write('		<td height="2"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('</table>');
}

function leftside()
{
	document.write('<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.write('	<tr>');
	document.write('    	<td width="100%" height="2" bgcolor="#ffffff"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td height="20"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td><img src="../images/left_wp.jpg" width="190" height="263" border="0"></td>');
	document.write('	</tr>');
	document.write('</table>');
}

//link part starts here
function links(argument1, argument)
{
	document.write('<table cellpadding="0" cellspacing="0" width="780" class="bgdarkgray" height="20" border="0">');
	document.write('	<tr align="center">');
	if (argument1=='sw'){
	//alert('sw');
		if (argument=='home'){
		//alert('sw home');
			document.write('		<td width="143"><img src="images/home_hover.jpg" alt="Hem" name="home" id="home" width="24" height="13" border="0"></td>');
		}else{
			document.write('		<td width="143"><a href="index.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'home\',\'\',\'images/home_hover.jpg\',1)><img src="images/home_normal.jpg" alt="Hem" name="home" id="home" width="24" height="13" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='parea'){
		//alert('sw parea');
			document.write('		<td width="200"><img src="images/practice_areas_hover.jpg" alt="Verksamhetsomraden" name="pareas" id="pareas" width="114" height="13" border="0"></td>');
		}else{
			document.write('		<td width="200"><a href="verksamhetsomraden.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'pareas\',\'\',\'images/practice_areas_hover.jpg\',2)><img src="images/practice_areas_normal.jpg" alt="Verksamhetsomraden" name="pareas" id="pareas" width="114" height="13" border="0"></a></td>');
		}
		document.write('		<td width="1" class="nav">|</td>');
		if (argument=='lawyer'){
			document.write('		<td width="158"><img src="images/lawyer_hover.jpg" alt="Advokater" name="people" id="people" width="56" height="12" border="0"></td>');
		}else{
			document.write('		<td width="158"><a href="advokater.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'people\',\'\',\'images/lawyer_hover.jpg\',3)><img src="images/lawyer_normal.jpg" alt="Advokater" name="people" id="people" width="56" height="12" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='contact'){
			document.write('		<td width="153"><img src="images/contact_hover.jpg" alt="Kontakt" name="contact" id="contact" width="42" height="13" border="0"></td>');
		}else{
			document.write('		<td width="153"><a href="kontakt.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'contact\',\'\',\'images/contact_hover.jpg\',4)><img src="images/contact_normal.jpg" alt="Kontakt" name="contact" id="contact" width="42" height="13" border="0"></a></td>'); //contact.htm
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='news'){
			document.write('		<td width="119"><img src="images/news_hover.jpg" alt="Aktuelt" name="news" id="news" width="42" height="13" border="0"></td>');
		}else{
			document.write('		<td width="119"><a href="aktuellt.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'news\',\'\',\'images/news_hover.jpg\',5)><img src="images/news_normal.jpg" alt="Aktuellt" name="news" id="news" width="42" height="13" border="0"></a></td>'); //news.htm
		}
	}
	if (argument1=='sp'){
	//alert('sp');
		if (argument=='home'){
		//alert('sp home');
			document.write('		<td width="153"><img src="images/home_hover.jpg" alt="Inicio" name="home" id="home" width="27" height="12" border="0"></td>');
		}else{
			document.write('		<td width="153"><a href="index.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'home\',\'\',\'images/home_hover.jpg\',1)><img src="images/home_normal.jpg" alt="Inicio" name="home" id="home" width="27" height="12" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='parea'){
			document.write('		<td width="160"><img src="images/practice_areas_hover.jpg" alt="Areas" name="pareas" id="pareas" width="30" height="12" border="0"></td>');
		}else{
			document.write('		<td width="160"><a href="areas.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'pareas\',\'\',\'images/practice_areas_hover.jpg\',2)><img src="images/practice_areas_normal.jpg" alt="Areas" name="pareas" id="pareas" width="30" height="12" border="0"></a></td>'); //practice_areas.htm
		}
		document.write('		<td width="1" class="nav">|</td>');
		if (argument=='lawyer'){
			document.write('		<td width="168"><img src="images/people_hover.jpg" alt="Abogados" name="people" id="people" width="52" height="12" border="0"></td>');
		}else{
			document.write('		<td width="168"><a href="abogados.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'people\',\'\',\'images/lawyer_hover.jpg\',3)><img src="images/lawyer_normal.jpg" alt="Abogados" name="people" id="people" width="52" height="12" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='contact'){
			document.write('		<td width="163"><img src="images/contact_hover.jpg" alt="Contacto" name="contact" id="contact" width="50" height="12" border="0"></td>');
		}else{
			document.write('		<td width="163"><a href="contacto.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'contact\',\'\',\'images/contact_hover.jpg\',4)><img src="images/contact_normal.jpg" alt="Contacto" name="contact" id="contact" width="50" height="12" border="0"></a></td>'); //contact.htm
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='news'){
			document.write('		<td width="129"><img src="images/news_hover.jpg" alt="Noticias" name="news" id="news" width="43" height="12" border="0"></td>');
		}else{
			document.write('		<td width="129"><a href="noticias.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'news\',\'\',\'images/news_hover.jpg\',5)><img src="images/news_normal.jpg" alt="Noticias" name="news" id="news" width="43" height="12" border="0"></a></td>'); //news.htm
		}
	}
	if (argument1=='eng'){
	//alert('eng');
		if (argument=='home'){
		//alert('eng home');
			document.write('		<td width="153"><img src="images/home_hover.jpg" alt="Home" name="home" id="home" width="32" height="12" border="0"></td>');
		}else{
			document.write('		<td width="153"><a href="index.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'home\',\'\',\'images/home_hover.jpg\',1)><img src="images/home_normal.jpg" alt="Home" name="home" id="home" width="32" height="12" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='parea'){
			document.write('		<td width="160"><img src="images/practice_areas_hover.jpg" alt="Practice areas" name="pareas" id="pareas" width="72" height="12" border="0"></td>');
		}else{
			document.write('		<td width="160"><a href="practice_areas.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'pareas\',\'\',\'images/practice_areas_hover.jpg\',2)><img src="images/practice_areas_normal.jpg" alt="Practice areas" name="pareas" id="pareas" width="72" height="12" border="0"></a></td>'); //practice_areas.htm
		}
		document.write('		<td width="1" class="nav">|</td>');
		if (argument=='lawyer'){
			document.write('		<td width="168"><img src="images/lawyer_hover.jpg" alt="Lawyer" name="people" id="people" width="42" height="12" border="0"></td>');
		}else{
			document.write('		<td width="168"><a href="lawyer.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'people\',\'\',\'images/lawyer_hover.jpg\',3)><img src="images/lawyer_normal.jpg" alt="Lawyer" name="people" id="people" width="42" height="12" border="0"></a></td>');
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='contact'){
			document.write('		<td width="163"><img src="images/contact_hover.jpg" alt="Contact" name="contact" id="contact" width="43" height="12" border="0"></td>');
		}else{
			document.write('		<td width="163"><a href="contact.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'contact\',\'\',\'images/contact_hover.jpg\',4)><img src="images/contact_normal.jpg" alt="Contact" name="contact" id="contact" width="43" height="12" border="0"></a></td>'); //contact.htm
		}
		document.write('		<td width="2" class="nav">|</td>');
		if (argument=='news'){
			document.write('		<td width="129"><img src="images/news_hover.jpg" alt="News" name="news" id="news" width="30" height="12" border="0"></td>');
		}else{
			document.write('		<td width="129"><a href="news.htm" onMouseOut=\'MM_swapImgRestore()\' onMouseOver=MM_swapImage(\'news\',\'\',\'images/news_hover.jpg\',5)><img src="images/news_normal.jpg" alt="News" name="news" id="news" width="30" height="12" border="0"></a></td>');  //news.htm
		}
	}
	document.write('	</tr>');
	document.write('</table>');
}
//link part ends here

function footer()
{
	document.write('<table cellpadding="0" cellspacing="0" width="780" border="0">');
	document.write('	<tr>');
	document.write('		<td width="190" class="bglightgray" valign="top"><img src="../images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('		<td width="15"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('		<td width="570" align="right" valign="top" class="footer">&copy; Copyright 2009 WallinPartners.com<br><img src="images/blanker.gif" width="1" height="5" border="0"></td>');
	document.write('		<td width="5"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td colspan="4" height="6" class="bgblue"><img src="images/blanker.gif" width="1" height="1" border="0"></td>');
	document.write('	</tr>');
	document.write('</table>');
}
