
var formOpen = false; var h = 0;
var av = true;

function hoehe() {
  if (self.innerHeight) { h = self.innerHeight-102; }
  else if (document.documentElement && document.documentElement.clientHeight) { h = document.documentElement.clientHeight-102; }
  else if (document.body) { h = document.body.clientHeight-102; }  
  //document.getElementById('scrollArea').style.height = h+"px";  
}
function rcolsize(n) {
    document.getElementById('rcol').style.width = n+'px';	
}
function closeText() {
	formOpen = false;
	document.getElementById('rcontent').innerHTML = "";
	document.getElementById('rcontent').style.height = 0+"px";
    rcolsize(0);		
}
function FormOpen() {
	if (formOpen) { formOpen = false; closeText(); }
	else { formOpen = true; contact(); }
}

function doload() {
    if (formOpen) contact();	
}

function contact() { 
	rcolsize(400); hoehe();
	document.getElementById('rcontent').innerHTML = "";
	var inhalt = '<table border="0" cellspacing="0" cellpadding="0">';
	inhalt+='<tr><td height="24" align="right" style="background-image: url(img/layout/bg_right0.jpg);"><a href="javascript:closeText();"><img src="img/layout/button.gif" width="24" height="24"></a></td></tr>';
	inhalt+='<tr><td valign="top" style="padding:2px;background-image: url(img/layout/bg_right1.jpg); background-position:top;">';	
	//inhalt+='<div style="position:relative; padding:13px;height:'+h+'px;overflow-y:scroll;overflow-x:hidden;"><br>'; 
	inhalt+='<div style="position:relative; padding:13px;height:'+h+'px;overflow:hidden;"><br>'; 
	 
	inhalt+='<form name="contact" method="POST" target="hiddenFrame" action="img/contact.php">';
	inhalt+='<strong>VIP-Anfrage:</strong>';
	
	inhalt+='<br><br><br>Angaben zur Person: &nbsp;&nbsp;(* notwendige Angaben)<br>';
	inhalt+='<table width="370" style="height:125px;" border="0" cellspacing="0" cellpadding="0">';          
    inhalt+='<tr><td width="130">Unternehmen:</td><td><input name="company" type="text" size="20"></td></tr>';
    inhalt+='<tr><td>Name*:</td><td><input name="surname" type="text" size="20"></td></tr>';
	inhalt+='<tr><td>Vorname*:</td><td><input name="firstname" type="text" size="20"></td></tr>';
	inhalt+='<tr><td>E-Mail*:</td><td><input name="email" type="text" size="20"></td></tr>';
	inhalt+='<tr><td>Telefon:</td><td><input name="telefon" type="telefon" size="20"></td></tr>';
    inhalt+='</table>';	
	
	inhalt+='<br><br>Interesse an folgenden Bereichen im VIP-Club West:<br>';
	inhalt+='<table width="370" style="height:67px;" border="0" cellspacing="0" cellpadding="0">';          
    inhalt+='<tr><td width="312"><input name="vip1" type="checkbox" value="vip1"> VIP-Logen West</td></tr>';
	inhalt+='<tr><td><input name="vip2" type="checkbox" value="vip2"> Business-Class West (Restaurant)</td></tr>';
	inhalt+='<tr><td><input name="vip3" type="checkbox" value="vip3"> Premium Lounge VIP West</td></tr>';
    inhalt+='</table><br>';
	inhalt+='Download: <a href="img/vip-bereiche.pdf" target="_blank">&Uuml;bersicht VIP-Bereiche</a>';	
	
	inhalt+='<br><br>Bemerkungen:<br>'; 
	inhalt+='<textarea name="comments" cols="30" rows="5"></textarea><br><br><br>';	
	inhalt+='<input type="submit" value="Senden"><br><br>';
	inhalt+='<div id="contactResult"></div>';
	inhalt+='</form>';
	inhalt+='</div></td></tr>';
	
	inhalt+='<tr><td height="48" style="background-image: url(img/layout/bg_right2.jpg);"></td></tr>';  
	inhalt+='</table>';	
		  
	document.getElementById('rcontent').innerHTML = inhalt;
}

function Avchat(name) { 	
	var inhalt = '';
	if (av == false) { 
		av = true;		    	
		document.getElementById("bottom").style.height = 0+'px';
		document.getElementById("bottom").innerHTML = '';
		hoehe();
	}
	else { 
		av = false;
		document.getElementById("bottom").style.height = 200+'px';
		inhalt = '<embed src="modules/SmartVideoConference.swf?name='+name+'" quality="high" bgcolor="#869ca7"';
        inhalt+= 'width="100%" height="200" name="SmartVideoConference" align="middle"';
        inhalt+= 'play="true" loop="false" quality="high" allowScriptAccess="sameDomain"';
        inhalt+= 'type="application/x-shockwave-flash" ';
        inhalt+= 'pluginspage="http://www.adobe.com/go/getflashplayer">';
     	inhalt+= '</embed>';		
		
		document.getElementById("bottom").innerHTML = inhalt;
		hoehe();		
	}			 		
}