    function showSubMenu(subMenu)
    {
        var allElements=document.all? document.all : document.getElementsByTagName("*");
        for (i=0; i<allElements.length; i++)
        {
            if (allElements[i].className=='submenu')
            {
                allElements[i].style.display='none';
            }
        }
        
        document.getElementById(subMenu).style.display='block';
    }

    function oppnakarta(Mekoid)
    { 
        window.open('stadkarta.asp?butikid=' + Mekoid,'1','width=482,height=525,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no'); 
    }

function oppnakarta1(Mekoid)
    { 
        window.open('stadkarta.asp?butikid=' + Mekoid,'1','width=1000,height=700,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no'); 
    }
    
    function displayProperty(ElementId, Property)
    {
        document.getElementById(ElementId).style.display=Property;
        document.getElementById('CloseMap').style.zIndex='0';
    }

function goSearch(userRegNo) {
	
	document.getElementById('workshop_menu').style.display='none';document.getElementById('shop_menu').style.display='none';document.getElementById('webcat_menu').style.display='block';
	document.form.RegNo.value=userRegNo;
}


function sameWin(str)
{document.location=str;}

function newWin(str)
{window.open(str);}


function showCampain(str, n){
	
    if(n<=0)
       return "";
    else if (n > String(str).length)
       sameWin(str);
    else {
       var iLen = String(str).length;
	if(str=='http://www.mekonomen.se/default2.asp?p=catalouge&amp;m=catalgoue'){
	document.location='default2.asp?p=catalouge&amp;m=catalgoue'
	}else{
	if(str.toLowerCase(String(str).substring(iLen, iLen - n)=='pdf'))
	{newWin(str);}
	else
	{sameWin(str);}}
    }
}



