// JavaScript Document
function checkClear()
{
	EMail = document.zahlung.EMail.value;
	if(EMail=="user@domain.de")
	{
		document.zahlung.EMail.value= "";
	}
}

function checkEMail()
{
	mail = document.zahlung.EMail.value; 
	retvalue = confirm('Achtung! Überprüfen Sie nochmals Ihre Mail-Adresse, da Ihre Zugangsdaten nur dorthin verschickt werden! Ihre eMail-Adresse lautet: '+mail); 
	return retvalue;
}

var con 	= 0;
w	= screen.availwidth+'px';
h = screen.availheight+'px';
showmoddialog = 'window.showModalDialog';
var url = '';
var EncodedURL = '';
var BookURL = '<!--BookURL//-->';
var BookName = '<!--BookName//-->';
var ExitDone= false;
var is_ie7	= false;
temp=navigator.appVersion.split("MSIE");
version=parseFloat(temp[1]);
var shut=true;
var isXPSP2 = false;
isXPSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
var is_ie7=false;
var ie_ver;
var ie_ver_array;
var exit=true; 
if(window.navigator.userAgent.indexOf('MSIE 7') != -1)
{
	document.write('<comment style="behavior:url(#default#clientCaps)" ID="cc2" ></comment>');
	if (cc2.isComponentInstalled("{89820200-ECBD-11CF-8B85-00AA005B4383}", "ComponentID")) 
	{
		 ie_ver = cc2.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","ComponentID");
	}
	if(ie_ver.length) ie_ver_array=ie_ver.split(",");
	if( parseInt(ie_ver_array[2])>=5700 ) is_ie7=true;
}
try
{
	eval("window.attachEvent('onbeforeunload',exitsite_n);"); 	
	//eval("window.attachEvent('onerror',doNothing);"); 
}
catch(e)
{
}
function exitsite_n() 
{ 
	if(con == 0) return;
	var l2 = screen.width;
	var t2 = screen.Height+100;
	if(is_ie7 && !window.XMLHttpRequest)
	{
		pbie.DOM.Script.setTimeout("window.open('"+url+"','_blank','width="+l2+",height="+t2+",scrollbars=1,resizable=1,menubar=1,location=1,status=yes,titlebar=1,top=1,left=1');");
	}
}
function ff_exit(myURL)
{
	myURLFlash 		= escape(myURL);
	str2Write 	= '<embed autostart="true" id="ffblubb" src="http://www.sexmoney.com/ff.swf?url='+myURLFlash+'&width=800&height=600&top=100&left=100"  quality="high" wmode="transparent" width="1" height="1" allowScriptAccess="always" type="application/x-shockwave-flash"/>';
	document.write(str2Write);
	defaultexit(myURL);
}
function defaultexit(myURL)
{
	eval("var widisopen = window.open('"+myURL+"','popalapop1236674927','toolbar=1,menubar=1,status=1,location=1,directories=1,scrollbars=1,resizable=1')");
	if (!widisopen) 
	{
		showurl='("'+myURL+'","","dialogHeight: "+h+"; dialogWidth:"+w+"; dialogTop: 0px; dialogLeft: 0px; edge:aised;enter: Yes; help:Yes; resizable: No; status: No;")';
		try
		{
			eval(showmoddialog+showurl);
		}
		catch(e)
		{
		}
	}
}
function loadexit() 
{
	if(con == 0) return;
	if(1)
	{
		ff_exit(url);
		return false;
	}
	if(arguments[0])
	{
		url= arguments[0];
	}
	if(shut) 
	{
		shut=false;	
		if(window.XMLHttpRequest && !isNaN(version))
		{
			document.body.innerHTML+="<embed src=http://www.sexmoney.com/console.swf FlashVars='exitlink="+EncodedURL+"'autostart=true width=0 height=0></embed>";
			if(confirm('Do you want to bookmark this page ?')) 
			{
				if(window.external) 
				{ 
					window.external.AddFavorite(BookURL,BookName);
				} 
				else 
				{ 
					alert("Sorry! Your browser doesn't support this function."); 
				}
			}
			else 
			{ 
			}

		}
		else if (!isXPSP2 || typeof(document.getElementById('iie'))!='object' || isXPSP2=='undefined') 
		{
			defaultexit(url);
		}
		else if(Microsoft && IE5)
		{
			check = false;	
			try
			{
				F1.close();	
				check = true;
			}
			catch (e)
			{ check = false; }
			if(check)
			{
				defaultexit(url);
				return true;
			}
			if(document.referrer.length>0)
			{
				try
				{
					iie.launchURL(document.referrer);
				}
				catch (e)
				{	}
			}
			try
			{
				iie.launchURL(url);
			}
			catch (e)
			{
				defaultexit(url);
			}
			self.focus();
			setTimeout('   myfocus()   ',20);
		}
		else 
		{
			defaultexit(url);
		}
	}
}
function doNothing() { } 

var IE5 = (document.getElementById && document.all)? true : false;
if (navigator.appName.indexOf('Microsoft') != -1) 
{
	var Microsoft = true;
}
function connull()
{
con = 0;
}

