//window.onerror=fehler;
function fehler(){return true;}


function detaillogolink(tourl){
	try{
		opener.location=tourl;
	}catch(e){
		document.location=tourl;
	}
}


function sendToList(pkey,typ,id){
	var jetzt = new Date();
	 
	elem=document.getElementById("ml_iframe");
	elem.src="../templates/merkliste_iframe.inc.php5?pkey="+pkey+"&typ="+typ+"&id="+id+"&t="+jetzt.getUTCSeconds();
}

function sendToListDetail(pkey,typ,id,window){
	var jetzt = new Date();
	 
	try{
		elem=opener.document.getElementById("ml_iframe");
		elem.src="../templates/merkliste_iframe.inc.php5?pkey="+pkey+"&typ="+typ+"&id="+id+"&window="+window+"&t="+jetzt.getUTCSeconds();
	}catch(e){
		elem=opener.opener.document.getElementById("ml_iframe");
		elem.src="../templates/merkliste_iframe.inc.php5?pkey="+pkey+"&typ="+typ+"&id="+id+"&window="+window+"&t="+jetzt.getUTCSeconds();
	}
}

function checkIfIsOnList(pkey,typ){
	/*
	elem=document.getElementById("ml_iframe");
	for(lauf=0;lauf<data.length; lauf++){
		if (merklisteData[lauf][1]==typ && merklisteData[lauf][0]==pkey)
			return true;
    }
	*/
}

function setMLButtonState(state,pkey,typ,id){
	// Aktuelles Array in iFrame durchlaufen 
	//elem=document.getElementById("mlpic_"+id);
	elem2=document.getElementById("mltext_"+id);
	if (state=="inList"){
		
		//elem.src="../pics/content/gemerkt.gif";
		elem2.innerHTML="Eintrag entfernen";
		
	}else{
		//elem.src="../pics/content/nicht_gemerkt.gif";
		elem2.innerHTML="Eintrag merken";
	
	}
}




function showImage(imgURL)
{
	IMG=window.open("","IMG","resizable=1,status=0,location=0,menubar=0,scrollbars=0,toolbar=0,height=500,width=800");
	doc=IMG.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\"../templates/show_image.php5?IMG="+imgURL+"\";</script></body></html>");
	doc.close();
	IMG.focus();
}

function openGallery(fID)
{
	IMG=window.open("","IMG","resizable=1,status=0,location=0,menubar=0,scrollbars=0,toolbar=0,top=0,left=0,height="+screen.availHeight+",width="+screen.availWidth);
	doc=IMG.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt.de - region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\"../galerie/index.php5?fID="+fID+"\";</script></body></html>");
	doc.close();
	IMG.focus();
}



function resizeWindow()
{
	height=document.images.bild.height;
	width=document.images.bild.width;

	if (navigator.appName.indexOf("Netscape")!=-1 &&  ((navigator.appVersion.indexOf("5.")!=-1) || (navigator.appVersion.indexOf("6.")!=-1))){
		width=width+10;
		height=height+120;
	}
	else{
		width=width+12;
		height=height+120;
	}	
	self.resizeTo(width,height);
	self.focus();
}

var tourdetail;
var sehenswertesdetail;
var gastrodetail;
var gemeindendetail;


function tourBewertung(cat,ID,mode)
{

	if (mode==undefined) mode="";
	if (mode=="_show") bars=1;
	else bars=0;

	
	tourBew=window.open("","tourBewl","resizable=1,status=0,location=0,menubar=0,scrollbars="+bars+",toolbar=0,height=725,width=600");
	doc=tourBew.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\"../templates/bewertung"+mode+".php5?CAT="+cat+"&tID="+ID+"\";</script></body></html>");
	doc.close();
	tourBew.focus();
}

function tourDetail(ID,UID)
{
	tourdetail=window.open("","tourdetail","resizable=1,status=0,location=0,menubar=0,scrollbars=1,toolbar=0,height=800,width=968");
	doc=tourdetail.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\""+document_root+"touren/tour_detail.php4?ID="+ID+"&UID="+UID+"\";</script></body></html>");
	doc.close();
	tourdetail.focus();
}

function sehenswertesDetail(ID,UID)
{
	sehenswertesdetail=window.open("","sehenswertesdetail","resizable=1,status=0,location=0,menubar=0,scrollbars=1,toolbar=0,height=800,width=968");
	doc=sehenswertesdetail.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\""+document_root+"sehenswertes/sehenswertes_detail.php4?ID="+ID+"&UID="+UID+"\";</script></body></html>");
	doc.close();
	sehenswertesdetail.focus();
}

function partnerDetail(ID,UID)
{
	partnerdetail=window.open("","partnerdetail","resizable=1,status=0,location=0,menubar=0,scrollbars=1,toolbar=0,height=800,width=968");
	doc=partnerdetail.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\""+document_root+"partner/partner_detail.php4?ID="+ID+"&UID="+UID+"\";</script></body></html>");
	doc.close();
	partnerdetail.focus();
}

function gastroDetail(ID,UID)
{
	gastrodetail=window.open("","gastrodetail","resizable=1,status=0,location=0,menubar=0,scrollbars=1,toolbar=0,height=800,width=968");
	doc=gastrodetail.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\""+document_root+"gastronomie/gastro_detail.php4?ID="+ID+"&UID="+UID+"\";</script></body></html>");
	doc.close();
	gastrodetail.focus();
}

function gemeindenDetail(ID,UID)
{
	gemeindendetail=window.open("","gastrodetail","resizable=1,status=0,location=0,menubar=0,scrollbars=1,toolbar=0,height=800,width=968");
	doc=gemeindendetail.document;
	doc.open();
	doc.writeln("<html><head><TITLE>wegpunkt-Region Hohenlohe</TITLE></head><body bgcolor='#ffffff'>");
	doc.writeln("");
	doc.writeln("<script language=javascript>this.document.location=\""+document_root+"gemeinden/gemeinden_detail.php4?ID="+ID+"&UID="+UID+"\";</script></body></html>");
	doc.close();
	gemeindendetail.focus();
}