function enframe(area, contentURL)
{
    var cmd = "";
    cmd += "setFramesContent (";
    cmd += "'" + "./_swf_files/nav" + area + ".swf" +"'";
    cmd += ", ";
    cmd += "'" + "./" + area + "/" + area + "Menu.htm" +"'";
    cmd += ", ";
    cmd += "'" + "./" + area + "/" + contentURL +"'";
    cmd += ")";
	
		
    if (top.location == self.location) {
        navigate("../" + area + ".htm");
        alert('Welcome back.' + contentURL);
        eval(cmd);
    }
}

function setFramesContent(locNav, locMenu, locContent) {
    
    top.frames.content.document.location.href = locContent;
    top.frames.menu.document.location.href = locMenu;
    top.parent.frames.nav.document.all.navFlash.movie = locNav;
}

function setLocation(area, contentURL) {
    var locContent, locMenu, locNav;
	
	//basic location setup for a "main page"	
    locContent = '../' + area + '/' + contentURL;
    locMenu    = '../' + area + '/' + area + 'Menu.htm';
    locNav     = './_swf_files/alko-nav'    + area + '.swf';
    
    //passthrough of subpage information 
    top.document.location.href = '../'+area+'.htm?' + contentURL;
   	
 
}

function setLocation_s(area, contentURL) {
    var locContent, locMenu, locNav;
	
	//basic location setup for a "main page"	
    locContent = '../' + area + '/' + contentURL;
    locMenu    = '../' + area + '/' + area + 'Menu.htm';
    locNav     = './_swf_files/alko-nav'    + area + '.swf';
    
    //passthrough of subpage information 
    top.document.location.href = './'+area+'.htm?' + contentURL;
   	
 
}


function highlightSelection(link) {
    for(var i = 0; i < document.links.length; i++)
        document.links[i].style.color="";        
    link.style.color = "Red";
}
    
function setInitialHighlight()
{
    var currContent = window.parent.frames.item(2).location.href;
    var d = top.document.location.search;
    
    //do this if we have a search string in the top URL
    if(d!=''){							
    	currContent= d.substring(1,d.length);
    	for(var i = 0; i < document.links.length; i++) {
        	if(currContent.indexOf(document.links.item(i).name) >= 0) {
            document.links[i].style.color = "Red";
        	}
        	else {
            	document.links[i].style.color="";
        	}
    	}
    }
    //do this for seting the normal default menu item
    else{
    	for(var i = 0; i < document.links.length; i++) {
        	if(currContent.indexOf(document.links.item(i).href) >= 0) {
            document.links[i].style.color = "Red";
            
        	}
        	else {
            	document.links[i].style.color="";
        	}
    	}
    }
}

