if ((self != top) && (parent.theMenu)) {
   var entryID = parent.theMenu.findEntry(location.pathname, "url", "right", 0);
   if (entryID >= 0) {
      parent.theMenu.selectEntry(entryID);
		  if (parent.theMenu.setEntry(entryID, true)) {
		     parent.theMenu.refresh();
      }
   }
}
else {
	var navPrinting = false;
	if ((navigator.appName + navigator.appVersion.substring(0, 1)) == "Netscape4") {
		 navPrinting = (self.innerHeight == 0) && (self.innerWidth == 0);
    }
  
  	if ((self.name != 'text') && (self.location.protocol != "file:") && (document.cookie.indexOf('mode=NoFrames') < 0) && !navPrinting) {
    	var searchValue = document.URL;
 		var findValue = searchValue.search(/rs3021/);
		//var engVers;
		var newLoc;

		//Sonderfall: ueberpruefen, ob die Domain von rs3021 ist, da sie im gleichen Verzeichnis steht wie wvs-tech, wenn ja anderes Verzeichnis waehlen
		if (findValue != -1) {
			newLoc = "http://www.rs3021cj.de/wvs-tech/index.php?site=rs3021cj";
		} else {
			// ueberpruefen, ob eine Englische oder Deutsche seite aufgerufen wird
			//engVers = (escape(self.location.pathname)).search(/_e.php/);
			//if (engVers != -1) {
			//	newLoc = "http://www.wvs-tech.de/wvs-tech/data/index_e.php?page=" + escape(self.location.pathname);
			//} else {
				newLoc = "http://www.wvs-tech.de/wvs-tech/data/index.php?page=" + escape(self.location.pathname);
			//}
		}

		if (parseInt(navigator.appVersion) >= 3) {
			self.location.replace(newLoc);
			//alert(newLoc);
		} else {
			self.location.href = newLoc;
			//alert (newLoc);
		}
	}
}

var divTextContentDE = "<b>Achtung:</b><br>Die hier gelisteten Daten haben historischen Charakter und sind teilweise nicht aktuell.<br>Bitte kontaktieren Sie uns, wenn sie beabsichtigen, einen Vakuum-Kondensator einzusetzen<br /><p style=\"text-align:right\"><a style=\"cursor:pointer;\" onclick=\"hideElement('InfoDiv');\">Ausblenden</a></p>";

var divTextContentEN = "<b>Attention:</b><br>This page gives historical data and does not reflect the actual available types.<br>Please contact us prior to order or design considerations.<br><br /><p style=\"text-align:right\"><a style=\"cursor:pointer;\" onclick=\"hideElement('InfoDiv');\">Hide</a></p>";

function showElement(eName)
{
 /*shows the div-object*/
 document.getElementById(eName).style.display='block';
}


function showInfoDivElement(eName,language)
{
 /* create div-object*/
 var newDivElement = document.createElement("div");  

 /* define Attribute ID*/
 newDivElement.id = "InfoDiv";  

 /* insert new object into HTML*/
 document.body.appendChild(newDivElement);
 
 /* insert content into the object*/
 setInfoDivContent(eName,language); 
 
 /*shows the div-object*/
 document.getElementById(eName).style.display='block'; 
}


function createErrorTag(name, msg)
{
	/* Create an error Message for wrong input of something */
	
	/* create div-object*/
	/*var newDivElement = document.createElement("div"); */ 

	/* define Attribute ID*/
	/*newDivElement.id = name; */ 

	/* insert new object into HTML*/
	/*document.body.appendChild(newDivElement);*/
 
	/* insert content into the object*/
	document.getElementById(name).innerHTML = msg; 
 
	/*shows the div-object*/
	document.getElementById(name).style.display='block'; 
}


function hideElement(eName)
{
 /*hide the div-object*/
 document.getElementById(eName).style.display='none';
}


function setInfoDivContent(eName,language)
{
 /* insert the content into the html-element*/
 switch (language)
 {
 	case "DE":
		document.getElementById(eName).innerHTML=this.divTextContentDE;
		break;	
	case "EN":
		document.getElementById(eName).innerHTML=this.divTextContentEN;
		break;
	default:
		document.all(eName).innerHTML="ERROR: The language you have chosen did not exist!!!";
 }
 
 
}

/* proofs the number of frames : TODO */
function checkNumberOfFrames() 
{
   var ANZ_FRAMES = 3;
   
   if (parent.frames.length < ANZ_FRAMES) {
      return false;
   }
   return true;
}

/* Reload the Frames : TODO*/
function reloadFrames() 
{
  if (checkNumberOfFrames()) {
	  /*<script language="JavaScript">
	  <!--
		function ZweiFrames(URL1,F1,URL2,F2)
	   {
		parent.frames[F1].location.href=URL1;
		parent.frames[F2].location.href=URL2;
	   }
	  //-->
	  </script>	*/
      window.top.location.href="index.php?page="+ escape(self.location.pathname);
  }
}