
function swopImage(imgname,newImg) {
	eval("document.images."+imgname+".src='"+newImg+"'");
//	eval("document.images."+imgname+".src=document.images."+newImg+".src");
}


function openWindow(fileName,windowName,theWidth,theHeight)
{
	if (windowName == "newAddressWindow") 
	{
		uniqueName = new Date();
		windowName = uniqueName.getTime();
	}
	window.open(fileName,windowName,"toolbar=0,location=0,left=50,top=40,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+theWidth+",height="+theHeight)	
	window.parent
}	



//--------------------------------------------------------------------------


var menus = new Array ('menu0', 'menu1', 'menu2', 'menu3');
var s = 1;
function initSearch() 	//to set the initial value 
{                                   
  if(s == 1) document.frmsearch.search.value='';
  s++;                              
  return 0;
}                                 

function hideAllMenu() 	//to hide all menu layers
{
  var layers;
  for( i=0; i<menus.length; i++)
  {
    layers = menus[i];
    hideLayer(layers);  
  }
  return 0;
}

function showMenu(menu) //to show the menu when mouse is over
{  
  var layers;
  hideAllMenu();  
  layers = menus[menu];
  showLayer(layers);
  return 0;  
}


function goSearch(q)
{
  if(q != '')
  {
    window.open('http://search.siemens.com/cgi-bin/search.asp??sdc_3dnvlstid=&sdc_countryid=180&sdc_unitid=999&sdc_sid=3817976356&sdc_contentid=292&sdc_sectionid=0&sdc_pnid=0&sdc_search_page=&sdc_rh=&sdc_sort_by=&sdc_search_lang=en&sdc_ggid=&sdc_mm_from=&sdc_flags=64&sdc_search_first=&sdc_yyyy_from=&sdc_langid=1&sdc_secnavid=0&sdc_dd_to=&sdc_dd_from=&sdc_mpid=0&sdc_search_cat=siemens_th&sdc_yyyy_to=&sdc_search_scope=&sdc_mm_to=&sdc_search_term=' +q + '&x=27&y=4');	
  }  
}


function showLayer(x)		//to show the x layer
{
  var layerMethod = getLayerMethod();
  
  if (layerMethod == "document.all")
    document.all[x].style.visibility = "visible";

  if (layerMethod == "document.layers")    
    document.layers[x].visibility = "show";
  
  if (layerMethod == "document.getElement")
    document.getElementById(x).style.visibility = "visible";
    
  return;
}

function hideLayer(x)		//to hide the x layer
{
  var layerMethod = getLayerMethod();
  
  if (layerMethod == "document.all")
    document.all[x].style.visibility = "hidden";

  if (layerMethod == "document.layers")
    document.layers[x].visibility = "hide";
  
  if (layerMethod == "document.getElement")
    document.getElementById(x).style.visibility = "hidden";
  
  return;
}

function getLayerMethod()	//to get the method that uses with the layer
{
  var layerMethod = "document.all";

  var appName = navigator.appName;
  var appVersion = navigator.appVersion;
  var userAgent = navigator.userAgent;

  if (userAgent.indexOf("Opera 4") > 0)
  {
    layerMethod = "document.getElement";
  }
  else
  {
    if (userAgent.indexOf("Opera 5") > 0)
    {
      layerMethod = "document.all";
    }
    else
    {
      if (userAgent.indexOf("Netscape6") > 0)
      {
        layerMethod = "document.getElement";
      }
      else
      {
        if (userAgent.indexOf("MSIE 4") > 0 || userAgent.indexOf("MSIE 5") > 0)
        {
          layerMethod = "document.all";
        }
        else
        {
          if (appName == "Netscape" && appVersion.charAt(0) == "4")
          {
            layerMethod = "document.layers";
          }
        }
      }
    }
  }

  return layerMethod;
}

function empty()
{
  status='';
  return;
}



