//
//	"sp_ex" setzt EMail-Adresse aus Parameter zusammen:
//
//	Aufruf: javascript:sp_ex('webmaster','lu','antoon','Ihr Foto bei LiW')
//


function sp_ex(p1, p2, p3, p4)
{
	x_str		= String.fromCharCode(109,97,105);
	x_str		= x_str + String.fromCharCode(108, 116, 111,58);
	x_str		= x_str + p1 + String.fromCharCode(64);
	x_str		= x_str + p3 + ".";
	x_str		= x_str + p2 + "?Sub";
	x_str		= x_str + "ject=" + p4.replace(/\"/g,"");
	location.href	= x_str;
}

//
//	"popUpMail" öffnet Popup-Fenster und stellt Bild dar, verwendet aber die codierte EMail-Adresse
// 
//	Aufruf: onClick="popUpPicMail('0725106.jpg', 320, 240, 'text', 'holger', '<holger@de@test@subject>')"
//
//	Verwendet in: archive_n.htm, album.cgi
//
var myWind
var file
var openFlag = false;


 	
function popUpPicMail(file, x_size, y_size, text, poster, email) 
{
		var height	= y_size + 190;
		var width		= x_size + 70;
		if ( openFlag && myWind.closed == false )
		{
			myWind.resizeTo(width, height);
		}
		else
		{
		myWind = window.open("", "LiW_Foto","toolbar=no,resizable=yes,statusbar=no,height=" + height + ",width=" + width);
		openFlag = true;
		} 			

		myWind.focus();
		
		if (location.host == "fp98_dev.laudenau.all")
		{  
			hostname= "fp98_dev.laudenau.all/landseerimweb";
		}
		else
		{
			hostname	= location.host;
		}


		myWind.document.open();
		with (myWind.document)
		{
			write ("<html>");
			write ("<head>");
			write ("<base href=\"http://" + hostname + "/data/Upload/\" />");
			write ("<link rel='stylesheet' type='text/css' href='http://" + hostname + "/formate/formate.css'>");
			write ("<SCRIPT LANGUAGE=\"JAVASCRIPT\">var message=\">> function disabled by WebMaster <<\";function click(e){if (document.all){if (event.button == 2){alert(message);return false;}}if (document.layers){if (e.which == 3){alert(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click; </SCRIPT>");
    		write ("<meta http-equiv=\"imagetoolbar\" content=\"no\">");
    		write ("<script language='JavaScript'>");
			write ("function sp_ex(p1, p2, p3, p4)");
			write ("{");
			write ("	x_str		= String.fromCharCode(109,97,105);");
			write ("	x_str		= x_str + String.fromCharCode(108, 116, 111,58);");
			write ("	x_str		= x_str + p1 + String.fromCharCode(64);");
			write ("	x_str		= x_str + p3 + \".\";");
			write ("	x_str		= x_str + p2 + \"?Sub\";");
			write ("	x_str		= x_str + \"ject=\" + p4.replace(/\"/g,\"\");");
			write ("	location.href	= x_str;");
			write ("}");
			write ("</SCRIPT>");
			write ("<title>Das Fotoalbum bei LiW</title></head>");
			write ("<body onload='var pic=new Image(); pic.src=\"" + file + "\"; document.picture.src=pic.src;'>");
			write ("<table border='0' width='100%' cellspacing='20'>");
			write ("<tr>");
			write ("<td width='100%' align='center'>");
			write ("<img name='picture' src='kl_" + file + "' width='"+ x_size + "' height='" + y_size + "'>");
			write ("</td>");
			write ("</tr>");
			write ("<tr>");
			if (email.length > 0)
			{
			email_str	= email.replace(/@/g, "\',\'");
			email_str	= email_str.replace(/</g, "\'");
			email_str	= email_str.replace(/>/g, "\'");
			write ("<td width='100%' align='center'>");
			write ("<i><b>" + text + "</b><br>(Ein Bild von : <a href=\"javascript:sp_ex(" + email_str + ")\">" + poster + "</a>)</i>");
			} else
			{
			write ("<td width='100%' align='center'>");
			write ("<i><b>" + text + "</b><br>(Ein Bild von : " + poster + ")</i>");
			}
			write ("<p><center><small><i><a href='javaScript:void(0)' onClick='window.close()'>Fenster schließen</a></i></small></center>");
			write ("</td>");
			write ("</tr>");
			write ("</table>");
			write ("</body>");
			write ("</hmtl>");
		}
		myWind.document.close();
}
//
//	"popUpPic" öffnet Popup-Fenster und stellt Bild dar, verwendet aber die uncodierte EMail-Adresse
//
//	Aufruf: onClick="popUpPic('../data/Upload/0725106.jpg', 320, 240)"
//
//	Verwendet in: archive_n.htm
//
var myWind
var file
var openFlag = false;



function popUpPic(file, x_size, y_size, text, poster, email)
{
                var height      = y_size + 190;
                var width               = x_size + 70;
                if ( openFlag && myWind.closed == false )
                {
                        myWind.resizeTo(width, height);
                }
                else
                {
                myWind = window.open("", "LiW_Foto","toolbar=no,resizable=yes,statusbar=no,height=" + height + ",width=" + width);
                openFlag = true;
                }

                myWind.focus()

				if (location.host == "fp98_dev.laudenau.all")
				{  
					hostname= "fp98_dev.laudenau.all/landseerimweb";
				}
					else
				{
					hostname	= location.host;
				}

                myWind.document.open();
                with (myWind.document)
                {
                        write ("<html>");
                        write ("<head><link rel='stylesheet' type='text/css' href='http://" + hostname + "/formate/formate.css'>");
						write ("<SCRIPT LANGUAGE=\"JAVASCRIPT\">var message=\">> function disabled by WebMaster <<\";function click(e){if (document.all){if (event.button == 2){alert(message);return false;}}if (document.layers){if (e.which == 3){alert(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click; </SCRIPT>");
          				write ("<meta http-equiv=\"imagetoolbar\" content=\"no\">");
          				write ("<title>Das Fotoalbum bei LiW</title></head>");
                        write ("<body onload='var pic=new Image(); pic.src=\"" + file + "\"; document.picture.src=pic.src;'>");
                        write ("<table border='0' width='100%' cellspacing='20'>");
                        write ("<tr>");
                        write ("<td width='100%' align='center'>");
                        write ("<img name='picture' src='kl_" + file + "' width='"+ x_size + "' height='" + y_size + "'>");
                        write ("</td>");
                        write ("</tr>");
                        write ("<tr>");
                        write ("<td width='100%' align='center'>");
                        write ("<i><b>" + text + "</b><br>(Ein Bild von : <a href='mailto:" + email + "?subject=Ihr Foto bei LiW'>" + poster + "</a>)</i>");
                        write ("<p><center><small><i><a href='javaScript:void(0)' onClick='window.close()'>Fenster schlie\337en</a></i></small></center>");
                        write ("</td>");
                        write ("</tr>");
                        write ("</table>");
                        write ("</body>");
                        write ("</hmtl>");
                }
                myWind.document.close();
}
//
//	"popUpPicOMail" öffnet Popup-Fenster und stellt Bild dar, benötigt aber keine Angaben über Poster und EMail
//
//	Aufruf: onClick="popUpPicOMail('../data/Upload/0725106.jpg', 320, 240, 'text')"
//
//	Verwendet in: Landseer.htm
//
var myWind
var file
var openFlag = false;

function popUpPicOMail(file, x_size, y_size, text) 
{
		var height	= y_size + 140;
		var width		= x_size + 70;
		
		if (location.host == "fp98_dev.laudenau.all")
		{  
			hostname= "fp98_dev.laudenau.all/landseerimweb";
		}
		else
		{
			hostname	= location.host;
		}
		
		if ( openFlag && myWind.closed == false )
		{
			myWind.resizeTo(width, height);
		}
		else
		{
		myWind = window.open("", "LiW_Foto","toolbar=no,resizable=yes,statusbar=no,height=" + height + ",width=" + width);
		openFlag = true;
		} 			

		myWind.focus()


		myWind.document.open();
		with (myWind.document)
		{
			write ("<html>");
			write ("<head><title>" + text + "</title></head>");
			write ("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://" + hostname + "/formate/formate.css\"></head>");
			write ("<body>");
			write ("<table border='0' width='100%' cellspacing='20'>");
			write ("<tr>");
			write ("<td width='100%' align='center'>");
			write ("<img src='" + file + "'>");
			write ("</td>");
			write ("</tr>");
			write ("<tr>");
			write ("<td width='100%' align='center'>");
			write ("<i><b>" + text + "</b>");
			write ("<p><center><small><i><a href='javaScript:void(0)' onClick='window.close()'>Fenster schließen</a></i></small></center>");
			write ("</td>");
			write ("</tr>");
			write ("</table>");
			write ("</body>");
			write ("</hmtl>");
		}
		myWind.document.close();
}

//
//
//
//
//


function popUpFile()
{
	var ypos;
	var browser;
	var browserVers;
	
	// alert(titel + " - " + datei + " - " +  breite + " - " + hoehe);
	browser 	= navigator.appName;
	browsernick	= navigator.appCodeName;
	browservers	= navigator.appVersion;
	
	if (browser.indexOf("Explorer") > 0)
	{
		ypos		= document.body.scrollTop;
		width		= document.getElementsByTagName("object")[0].width;
		width_num	= Number(width) + 10;
		width		= String(width_num) + "px";
		document.all.htmlpopup.style.width	= width;
	}
	else
	{
		ypos	= window.pageYOffset;
	}

	document.all.htmlpopup.style.top 		= ypos + 10;
	document.all.htmlpopup.style.left 		= 10;
	document.all.htmlpopup.style.visibility = 'visible';

}


//
//
//

function skype_me (id, level)
{
	var	myWind;
	var dir;
	
	if (level == "0") dir = "";
	if (level == "1") dir = "../";
	if (level == "2") dir = "../../";
	if (level == "3") dir = "../../../";
		
	myWind = window.open("", "SkypeMe","toolbar=no,resizable=yes,statusbar=no,height=370,width=500,left=50,top=50");
    myWind.document.open();
   	myWind.document.write ("<html>");
  	myWind.document.write ("<head><link rel='stylesheet' type='text/css' href='" + dir + "formate/formate.css'>");
    myWind.document.write ("<title>SkypeMe!</title></head>");
    myWind.document.write ("<body>");
    myWind.document.write ("<center><big><em><b>SkypMe!</b></em></big></center>");
    myWind.document.write ("<p>Skype ist ein kostenlos erhältliches Programm, das zum Telefonieren über InterNet, zum Versenden von Instant Messages und zum Übertragen von Dateien genutzt werden kann.");
	myWind.document.write ("Um Skype nutzen zu können, müssen Sie jedoch die entsprechende Software auf Ihrem System installiert haben.<br>");
	myWind.document.write ("Mehr Infos, FAQs und Downloads zu Skype unter <a href='http://www.skype.com' target='_blank'>www.skype.com</a> oder der deutschsprachigen Seite <a href='http://www.planetskype.de' target='_blank'>www.planetskype.de</a>.");
	myWind.document.write ("<p>Sollten Sie Skype jetzt nutzen wollen, um den (Skype)-Benutzer <b><em>" + id + "</em></b> anrufen zu wollen, clicken Sie bitte auf den untenstehenden Button.");
	myWind.document.write ("<p><center><a href='callto://" + id + "'><IMG SRC='" + dir + "images/skype.gif' BORDER=0 width='80' height='18'></a>");
	myWind.document.write ("<p><small><i><a href='javaScript:void(0)' onClick='window.close()'>Fenster schlie\337en</a></i></small>");
    myWind.document.write ("</body>");
    myWind.document.write ("</hmtl>");
	myWind.document.close();


}

//
//
//

function reframe (newlocation)
{
	if ((this.window == window.top) | (parent.name != "LiW_Main")) 
		top.location.replace(newlocation);
}
