/* hash */

var hash=escape(self.location.pathname);
if (hash)
{
	
	var testeradframe = hash.indexOf('adframe');
	if (testeradframe==-1)
	{	
		//alert(hash);
		var testerhtm = hash.indexOf('.htm');
		if (testerhtm == -1)
		{
			hash+='index.html';
		}
		var temp='/cgi-bin/adframe'+hash+self.location.search;
		top.location=temp 
	}
}


/* genericOpen */

function genericOpen(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=yes,scrollbars=yes,width="+width+",height="+height); 
}

function genericOpenNoScroll(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=no,scrollbars=no,width="+width+",height="+height); 
}


function WinOpenbd(tomail,toname,tofunktion,subject)
 {
var myurl = "http://www.bdverlag.de";
	myurl+= "/cgi-bin/mail/mail.cgi?template=bd_mail.html&success=bd_success.html&to_email="+tomail+"&to_name="+toname+"&to_funktion="+tofunktion+"&subject="+subject;
msg=open(myurl,"popup","toolbar=0,status=1,menubar=0,resizable=no,scrollbars=yes,width=450,height=470"); 
}

function openGalleryPopup(popupName,popupWidth,popupHeight,imageFile,imageWidth,imageHeight,sessionId)
{
	var url = "/cgi-bin/adframe/popup.html?id="+sessionId+"&imageFile="+imageFile+"&imageWidth="+imageWidth+"&imageHeight="+imageHeight;
	var genmesg = open(url,popupName,"toolbar=0,status=1,menubar=0,resizable=no,scrollbars=no,width="+popupWidth+",height="+popupHeight); 
}

function strReplace(string)
{
			var anArray = new Array(2);
			anArray[0] = new Array("Ö", "ö", "Ä", "ä", "Ü", "ü", "ß","°",'"',"…","€");
			anArray[1] = new Array("&Ouml;", "&ouml;", "&Auml;", "&auml;", "&Uuml;", "&uuml;", "&szlig;","&deg;","&quot;","...","&euro;");
			var index=0;
			
		
		
		
			for (var i=0; i<anArray[index].length; i++){
				myRegExp = new RegExp(anArray[index][i],"g");
				string = string.replace(myRegExp, anArray[(index==0?1:0)][i]);
		
				
			}
			return string;
}


function strReturn(string)
{
			var anArray = new Array(2);
			anArray[0] = new Array("&Ouml;", "&ouml;", "&Auml;", "&auml;", "&Uuml;", "&uuml;", "&szlig;","&deg;","&quot;","&euro;");
			anArray[1] = new Array("Ö", "ö", "Ä", "ä", "Ü", "ü", "ß","°",'"',"€");
			
			var index=0;
			
		
		
		
			for (var i=0; i<anArray[index].length; i++){
				myRegExp = new RegExp(anArray[index][i],"g");
				string = string.replace(myRegExp, anArray[(index==0?1:0)][i]);
		
				
			}
			return string;
}