function CS_updateSearchActionURL() {
	var pForm = document.ec_formSearch;
	var strQueryParamName = "Query";
	var strSearchQueryString = strQueryParamName + "=" + escape(pForm[strQueryParamName].value);
	pForm.action = pForm.action.replace(eval("/" + strQueryParamName + "=test/"), strSearchQueryString);
}





function init()
{
	fixPlaceholderLinks();
}

function generateLinks() {
  var cell, cell2, link, linklist, linktext, innerHTML, j
  var sTemp
  sTemp = "<tr><td class='clsMainDetailText' valign='bottom'>"
  sTemp = sTemp + g_img_arrow_down
  innerHTML = ""
  try {
    var cells = document.all.item("localadr")
    if (cells != null) {
      linklist = document.all.item("linklist")
      j = 0
      for(i = 0; i < cells.length; i=i+2){
        j = j + 1
        cell = cells.item(i)
        cell2 = cells.item(i+1)
        //alert(cell.innerText)
        if ((cell.innerText != "") || (cell2.innerText != ""))  {
          link = document.createElement("<a></a>")
          // get relevant toptext
          switch(i.toString()) {
            case "0":
              linktext = document.all.item("localadr_header1").innerText
              break
            case "2":
              linktext = document.all.item("localadr_header2").innerText
              break;
            case "4":
              linktext = document.all.item("localadr_header3").innerText
              break;
            case "6":
              linktext = document.all.item("localadr_header4").innerText
              //alert(linktext.length)
              break;
            default:
              //alert("øv" + i.toString())
              break;
          }
          //link.href="#anchor" + i
          link.href="#header_anchor" + j
          link.valign="center"
          //link.innerText = linktext
          //linklist.innerHTML = linklist.innerHTML + link.outerHTML
          if ((linktext != "") && (linktext.length > 1)) {
            link.innerText = linktext
            innerHTML = innerHTML + sTemp + "&nbsp;&nbsp;&nbsp;" + link.outerHTML + "</td></tr>"
          }
        }
      }
      if (innerHTML != "") {
        linklist.innerHTML = "<table cellspacing='0' cellpadding='0'>" + innerHTML + "</table>"
      }
    } else {
      //alert("no cells")
    }
  } catch (e) {
    //alert("øv")
  }
}
function findAndFixAnchors(node) {
  var i, j, nodes
  try {
    nodes = node.all
    if (nodes != null) {
      if (nodes.length != null) {
        for(i=0; i<nodes.length; i++) {
          if (nodes(i).tagName == "A") {
            nodes(i).style.color="blue"
           nodes(i).style.textDecoration="underline"
         }
        }
      } else {
        if (nodes(i).tagName == "A") {
          nodes(i).style.color="blue"
         nodes(i).style.textDecoration="underline"
       }
      }
    }
  } catch(e) { }
}

function fixPlaceholderLinks() {
  var i, j, nodes
  try {
    nodes = document.all.item("bluelink")
    if (nodes != null) {
      if (nodes.length != null) {
        for(i=0; i<nodes.length; i++) {
          findAndFixAnchors(nodes(i))
        }
      } else {
        findAndFixAnchors(nodes)
      }
    }
  } catch(e) { 1==1;}
}


function dropdown_mouse_over(obj)  {
	obj.style.cursor='pointer'; 
	obj.className="select-drop-down-active";
}

function dropdown_mouse_out(obj)  {
	obj.style.cursor=''; 
	obj.className="select-drop-down-element";
}

function dropdown_mouse_click(obj,myLink){
	if (myLink) {
		top.location.href=myLink;
	}
}

function dropdown_clicked(id) {
	obj=document.getElementById(id);
	if (!obj)
		return false;
		
	if (obj.style.display=='none') {
		obj.style.display='';
	} else {
		obj.style.display='none';
	}
}

// Common menu fuctions start
	function ShowDownArrow(o) {
		changeImage(o, Arrws[3]);
	}
	
	function showRightArrow(o) {
		changeImage(o, Arrws[0]);
	}
	
	function changeImage(o, src) {
		if(typeof(o.children.item(0)) != 'undefined') {
			var img = o.children.item(0);
	
			img.src = src;
		}
	}
	
	function ciber_closemenu(o) {
		var level = o.getAttribute("Lvl");
		var children = o.getAttribute("NofChlds");
		
		if(level > 1 && children > 0) {
			showRightArrow(o);
		}
	}
	
	function ciber_openmenuclick(o) {
		return false;
	}
	
	function ciber_openMenu(o) {
		var level = o.getAttribute("Lvl");
		var children = o.getAttribute("NofChlds");
		
		if(level > 1 && children > 0) {
			ShowDownArrow(o);
		}
		
		var text = o.getAttribute("ToolTip");
		
		if(text != null && typeof(text) != 'undefined' && text.nodeValue != '') {
		}
	}
	
	function showToolTip(text, x, y) {
		o = document.getElementById("ToolTip");
		
		if(o != null && typeof(o) != 'undefined') {
		}
	}
	
	function ciber_navigate(o) {
	}

	// Colorvariables:
	// Color variables take HTML predefined color names or "#rrggbb" strings
	// For transparency make colors and border color ""
	var LowBgColor="#666666";						// Background color when mouse is not over
	var HighBgColor="#999999";						// Background color when mouse is over
	var FontLowColor="white";						// Font color when mouse is not over
	var FontHighColor="white";						// Font color when mouse is over
	var BorderColor="";								// Border color
	var BorderWidthMain=1;							// Border width main items
	var BorderWidthSub=1;							// Border width sub items
 	var BorderBtwnMain=0;							// Border between elements main items 1 or 0
	var BorderBtwnSub=1;							// Border between elements sub items 1 or 0
	var FontFamily="Verdana, Arial";					// Font family menu items
	var FontSize=8;									// Font size menu items
	var FontBold=0;									// Bold menu items 1 or 0
	var FontItalic=0;								// Italic menu items 1 or 0
	var MenuTextCentered="left";					// Item text position left, center or right
	var MenuCentered="left";						// Menu horizontal position can be: left, center, right, justify,
													//  leftjustify, centerjustify or rightjustify. PartOfWindow determines part of window to use
	var MenuVerticalCentered="top";						// Menu vertical position top, middle,bottom or static
	var VerCorrect=0;								// Multiple frames y correction
	var HorCorrect=0;								// Multiple frames x correction
	var LeftPaddng=11;								// Left padding
	var TopPaddng=3;								// Top padding
	var ChildOverlap=-0.01;							// horizontal overlap child/ parent
	var ChildVerticalOverlap=-0.01;					// vertical overlap child/ parent
	var StartTop=0;									// Menu offset x coordinate
	var StartLeft=0;								// Menu offset y coordinate
	
		var FirstLineHorizontal=1;						// First level items layout horizontal 1 or 0
	var MenuFramesVertical=0;						// Frames in cols or rows 1 or 0
	var DissapearDelay=200;	 						// delay before menu folds in - ¤ HAL
	var UnfoldDelay=0;								// delay before sub unfolds
	var TakeOverBgColor=1;							// Menu frame takes over background color subitem frame
	var FirstLineFrame="";							// Frame where first level appears
	var SecLineFrame="";							// Frame where sub levels appear
	var DocTargetFrame="";							// Frame where target documents appear
	var TargetLoc="MenuPos";						// span id for relative positioning
	var MenuWrap=1;									// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;								// enables/ disables right to left unfold 1 or 0
	var BottomUp=0;									// enables/ disables Bottom up unfold 1 or 0
	var UnfoldsOnClick=0;							// Level 1 unfolds onclick/ onmouseover
	var BaseHref="";								// BaseHref lets you specify the root directory for relative links.
													// The script precedes your relative links with BaseHref
													// For instance:
													// when your BaseHref= "http://www.MyDomain/" and a link in the menu is "subdir/MyFile.htm",
													// the script renders to: "http://www.MyDomain/subdir/MyFile.htm"
													// Can also be used when you use images in the textfields of the menu
													// "MenuX=new Array("<img src=\""+BaseHref+"MyImage\">"
													// For testing on your harddisk use syntax like: BaseHref="file:///C|/MyFiles/Homepage/"

	var MenuUsesFrames=0;				// MenuUsesFrames is only 0 when Main menu, submenus,
							// document targets and script are in the same frame.
							// In all other cases it must be 1

	var RememberStatus=0;				// RememberStatus: When set to 1, menu unfolds to the presetted menu item.
							// When set to 2 only the relevant main item stays highligthed
							// The preset is done by setting a variable in the head section of the target document.
							// 2_2_1 represents the menu item Menu2_2_1=new Array(.......

	var PartOfWindow=.7;				// PartOfWindow: When MenuCentered is justify, sets part of window width to stretch to
							// Below some pretty useless effects, since only IE6+ supports them
							// I provided 3 effects: MenuSlide, MenuShadow and MenuOpacity
							// If you don't need MenuSlide just leave in the line var MenuSlide="";
							// delete the other MenuSlide statements
							// In general leave the MenuSlide you need in and delete the others.
							// Above is also valid for MenuShadow and MenuOpacity
							// You can also use other effects by specifying another filter for MenuShadow and MenuOpacity.
							// You can add more filters by concanating the strings
	var BuildOnDemand=1;				// 1/0 When set to 1 the sub menus are build when the parent is moused over
	var MenuSlide="";

	var MenuShadow="";

	var MenuOpacity="";

	function BeforeStart()
	{
		return
	}

	function AfterBuild()
	{
		return
	}
	function BeforeFirstOpen()
	{
	 	if(ScLoc.HideArray)
	 	{
         	var H_A,H_Al,H_El,i;
         	var S_A;
          	S_A=ScLoc.ShowArray;
          	H_A=ScLoc.HideArray;
          	H_Al=H_A.length;
          	for (i=0;i<H_Al;i++)
          	{
	   			H_El=Nav4?ScLoc.document.layers[H_A[i]]:DomYes?ScLoc.document.getElementById(H_A[i]).style:ScLoc.document.all[H_A[i]].style;
      			S_A[i] = document.getElementById(H_A[i]).innerHTML;
	   			document.getElementById(H_A[i]).innerHTML = PictArray[H_A[i]]

	   		}
	 	}
	}

	function AfterCloseAll()
	{
			if(ScLoc.HideArray)
	  		{
	    		var H_A,H_Al,H_El,i;
      		    var S_A;
        	    S_A=ScLoc.ShowArray;
	    		H_A=ScLoc.HideArray;
	    		H_Al=H_A.length;
	    		for (i=0;i<H_Al;i++)
	    		{
	      			H_El=Nav4?ScLoc.document.layers[H_A[i]]:DomYes?ScLoc.document.getElementById(H_A[i]).style:ScLoc.document.all[H_A[i]].style;
	      			document.getElementById(H_A[i]).innerHTML = S_A[i] ;
	    		}
			    var flashElement
	            flashElement=ns6? document.getElementById("frontpageflash") : document.all.frontpageflash;
	    		if (flashElement != null)
	    		{
        			flashElement.Rewind();
               		flashElement.play();
        		}
	    	}
	}
