function popLayer(msg){
	document.getElementById('popLayer').style.left = mauspositionX + 5 + 'px';
	document.getElementById('popLayer').style.top = mauspositionY + 5 + 'px';
	document.getElementById('popLayer').innerHTML = msg;
	getContent('scripts/strHelper.php?id='+msg,'popLayer');
	if (document.getElementById('popLayer').offsetWidth > 350){
    document.getElementById('popLayer').style.width= '350px';
  }
	showdiv('popLayer');
}
function popLayerClose(){
  hidediv("popLayer");
}
function LanguageBoxShow(){
	document.getElementById('LanguageBox').style.left = mauspositionX + 5 + 'px';
	document.getElementById('LanguageBox').style.top = mauspositionY + 5 + 'px';
	getContent('cnt/language.php','LanguageBox');
	showdiv('LanguageBox');
}

function ShowUserInfo(uid,div) {
	document.getElementById('UserInfoBox').style.left = mauspositionX + 5 + 'px';
	document.getElementById('UserInfoBox').style.top = mauspositionY + 5 + 'px';
	getContent('scripts/UserInfoBox.php?id='+uid,'UserInfoBox');
	div.style.backgroundColor='#0f0f0f';
	showdiv("UserInfoBox");
}

function HideUserInfo(uid,div) {
    div.style.backgroundColor='#ffffff';
    hidediv("UserInfoBox");
}

function ContentBoxShow(url, title, w, h) {
	 h = typeof(h) != 'undefined' ? h : 511;
	 w = typeof(w) != 'undefined' ? w : 799;
	 title = typeof(title) != 'undefined' ? title : '';
	document.getElementById('ContentBox').style.backgroundImage = 'url(_img/bg_cntbox.gif)'
	var pageX = (document.all)?document.body.offsetWidth:window.innerWidth;
	var pageY = (document.all)?document.body.offsetHeight:window.innerHeight;
	document.getElementById('ContentBox').style.height = h + 'px';
	document.getElementById('ContentBox').style.width  = w + 'px';
 	document.getElementById('ContentBox').style.left = ((pageX/2)-(w/2))+"px";
	document.getElementById('ContentBox').style.top = ((pageY/2)-(h/2))+"px";
	document.getElementById('ContentBoxTitle').innerHTML = title; 
	 
//	document.getElementById('ContentBox').style.left = mauspositionX + 5 + 'px';
//	document.getElementById('ContentBox').style.top = mauspositionY + 5 + 'px';
getAXAH(url,'content');
	//execJS(document.getElementById('ContentBoxContent'));
	//showdiv("ContentBox");
}

function ContentBoxClose() {
	hidediv("ContentBox");
}




function hidediv(div) {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(div).style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.div.visibility = 'hidden';
}
else { // IE 4
document.all.div.style.visibility = 'hidden';
}
}
}

function showdiv(div) {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(div).style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.div.visibility = 'visible';
}
else { // IE 4
document.all.div.style.visibility = 'visible';
}
}
}

/*

Funktion zum Aufrufen einer HTML/XML Seite per Javascript.
Bei Bedarf werden auch Javascript-Inhalte von der bertragenen Seite aus aufgerufen.

Der Aufruf gestaltet sich wie folgt:

<script language="javascript" type="text/javascript">
 getAXAH('http://www.xyz.com/testseite.html','hierHinein');
</script>
<div id="hierHinein"></div>

Wenn die einzubindende Seite Javascript enth?, muss in diesem die Kommentare in der form /* Kommentar * / geschrieben werden,
da durch die Eval Function alle Javascriptstatements als eine Zeile behandelt werden.

----------------------------------
(C) 2006 by Lukas Dorn-Fussenegger

*/

/* getAXAH('http://www.url.com', 'DivElementWosHineinsoll') */
function getAXAH(url,elementContainer){
 /* Optionen festlegen */
 var showPlatzhalterWhileLoading = true;
 var execJavaScriptAfterTransfer = true;
 var changeStatusbar = true;
 /* Statuszeile anpassen. */
 if (changeStatusbar == true) { window.status = 'Ajax:' + url; }

 /* Anzeigen eines Blindtextes w?end des Ladevorganges, aber nur wenn noch kein Inhalt im Element vorhanden ist... */
 /* Diese Zeilen knnen bei bedarf entfernt werden */
 if (showPlatzhalterWhileLoading == true) {
  if (document.getElementById(elementContainer).innerHTML == '') {
   document.getElementById(elementContainer).innerHTML = "Lade von " + url + " ...";
  }
 }
 
 var theHttpRequest = getNewHttpObject();
 theHttpRequest.onreadystatechange = function() {processAXAH(elementContainer);};
 
 /* ?erprfen ob eine Zufallszahl hinzugefgt werden soll, um den Inhalt nicht zu cachen. */
 /* Das hinzufgen der Zufallszahl ist deswegen notwendig, da die Inhalte sonst im Browser gecached werden, und nicht neu geladen werden. */
 
 /* ?erprfen ob bereits Parameter bei der Abfrage verwendet werden oder nicht */
 if (url.indexOf('?') == -1) {
  /* Wenn keine Parameter vorhanden sind wird ein komplett neuer Parameter-Satz deklariert */
  url = url + '?RANDOM' + Math.floor(Math.random()*1024*1024) + "=" + Math.floor(Math.random()*1024*1024) + Math.floor(Math.random()*1024*1024);
 } else {
  /* Wenn bereits Parameter angegeben wurden, wird hinten noch ein weiterer angeh?t */
  url = url + '&RANDOM' + Math.floor(Math.random()*1024*1024) + "=" + Math.floor(Math.random()*1024*1024) + Math.floor(Math.random()*1024*1024);
 }
 theHttpRequest.open("GET", url);
 theHttpRequest.send(null);
 function processAXAH(elementContainer){
  if (theHttpRequest.readyState == 4)
  {
   if (theHttpRequest.status == 200) {
    document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
    /* Javascript ausfhren wenn eines mitgesendet wurde */
    if (execJavaScriptAfterTransfer == true) { execJS(document.getElementById(elementContainer)); }
   }
   else
   { document.getElementById(elementContainer).innerHTML="Error! Fehler: " + theHttpRequest.statusText; } 
  } /* End If */
 } /* End Function */
 if (changeStatusbar == true) { window.status = ''; }
}

function getNewHttpObject() { var objType = false; try { objType = new ActiveXObject('Msxml2.XMLHTTP');}
 catch(e) {try { objType = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) { objType = new XMLHttpRequest(); }}
 return objType; }

function execJS(node) {
 /* Element auf Javascript berprfen, und falls ntig ausfhren */
 var bSaf = (navigator.userAgent.indexOf('Safari') != -1);
 var bOpera = (navigator.userAgent.indexOf('Opera') != -1);
 var bMoz = (navigator.appName == 'Netscape');
 var st = node.getElementsByTagName('script'); var strExec;
   
 for(var i=0;i<st.length; i++) { if (bSaf) { strExec = st[i].innerHTML; } else if (bOpera) { strExec = st[i].text; }
   else if (bMoz) { strExec = st[i].textContent; } else { strExec = st[i].text; } try { eval(strExec); } catch(e) { alert(e);}
   }
   
   }
   

function SuggestBoxClose(div){
		 document.getElementById(div).style.display = "none";
}

function Town1()
{
   document.getElementById("ac3update").style.display = "";
  var eingabe=document.getElementById("ac3").value;
    
  with (new Ajax()){  
    url="scripts/getTown.php";
    method="POST";
    params="value="+eingabe+"&form=formNewDig&div=ac3update&txt=ac3";
    onSuccess=successHandler;
    onError=errorHandler;
    doRequest();
  }
  
  
//Den Text in die Seite einfuegen
function successHandler(txt,xml){
  document.getElementById("ac3update").innerHTML=txt;
}
//Fehler
function errorHandler(msg){
  document.getElementById("ac3update").innerHTML=msg;
}

}


function Town2()
{
   document.getElementById("ac4update").style.display = "";
  var eingabe=document.getElementById("ac4").value;
    
  with (new Ajax()){  
    url="scripts/getTown.php";
    method="POST";
    params="value="+eingabe+"&form=frmNewDig&div=ac4update&txt=ac4";
    onSuccess=successHandler2;
    onError=errorHandler2;
    doRequest();
  }
function successHandler2(txt,xml){
  document.getElementById("ac4update").innerHTML=txt;
}
function errorHandler2(msg){
  document.getElementById("ac4update").innerHTML=msg;
}

}
 
 
function Town3()
{
   document.getElementById("ac5update").style.display = "";
  var eingabe=document.getElementById("ac5").value;
    
  with (new Ajax()){  
    url="scripts/getTown.php";
    method="POST";
    params="value="+eingabe+"&form=frmProfil&div=ac5update&txt=ac5";
    onSuccess=successHandler3;
    onError=errorHandler3;
    doRequest();
  }
function successHandler3(txt,xml){
  document.getElementById("ac5update").innerHTML=txt;
}
function errorHandler3(msg){
  document.getElementById("ac5update").innerHTML=msg;
}

}
 
 
  
function Town4()
{
   document.getElementById("ac6update").style.display = "";
  var eingabe=document.getElementById("ac6").value;
    
  with (new Ajax()){  
    url="scripts/getTown.php";
    method="POST";
    params="value="+eingabe+"&form=frmSignup&div=ac6update&txt=ac6";
    onSuccess=successHandler4;
    onError=errorHandler4;
    doRequest();
  }
function successHandler4(txt,xml){
  document.getElementById("ac6update").innerHTML=txt;
}
function errorHandler4(msg){
  document.getElementById("ac6update").innerHTML=msg;
}

}
 
function Town9()
{
   document.getElementById("ac9update").style.display = "";
  var eingabe=document.getElementById("ac9").value;
    
  with (new Ajax()){  
    url="scripts/getTown.php";
    method="POST";
    params="value="+eingabe+"&form=searchDiggerForm&div=ac9update&txt=ac9";
    onSuccess=successHandler9;
    onError=errorHandler9;
    doRequest();
  }
function successHandler9(txt,xml){
  document.getElementById("ac9update").innerHTML=txt;
}
function errorHandler9(msg){
  document.getElementById("ac9update").innerHTML=msg;
}

}

data = [
'New York City', 
'Los Angeles',
'Chicago',
'Houston',
'Phoenix',
'Philadelphia', 
'San Antonio',
'San Diego',
'Dallas',
'San José',
'Detroit',
'Jacksonville', 
'Indianapolis',
'San Francisco',
'Columbus',
'Austin',
'Fort Worth', 
'Memphis',
'Charlotte',
'Baltimore',
'El Paso',
'Milwaukee',
'Boston',
'Seattle',
'Nashville',
'Denver',
'Washington D. C.', 
'Las Vegas',
'Louisville',
'Portland',
'Oklahoma City', 
'Tucson',
'Atlanta',
'Albuquerque', 
'Fresno',
'Long Beach', 
'Sacramento',
'Mesa',
'Kansas City', 
'Cleveland',
'Virginia Beach', 
'Omaha',
'Miami',
'Oakland',
'Tulsa',
'Minneapolis', 
'Colorado Springs', 
'Raleigh',
'Honolulu1',
'Arlington',
'Wichita',
'St. Louis',
'Santa Ana',
'Tampa',
'Anaheim',
'Cincinnati', 
'Bakersfield',
'Aurora',
'Pittsburgh', 
'Toledo',
'Riverside', 
'Stockton',
'Corpus Christi', 
'Newark',
'Anchorage', 
'Lexington',
'Saint Paul',
'Buffalo',
'Plano',
'Glendale', 
'Fort Wayne', 
'Henderson',
'Lincoln',
'Greensboro', 
'Saint Petersburg', 
'Chandler',
'Jersey City', 
'New Orleans',
'Norfolk',
'Scottsdale', 
'Birmingham',
'Madison',
'Orlando',
'Baton Rouge', 
'Chesapeake',
'Garland',
'Durham',
'Laredo',
'Chula Vista', 
'Lubbock',
'Winston-Salem', 
'Reno',
'Hialeah', 
'North Las Vegas', 
'Akron',
'Gilbert',
'Rochester',
'Arlington1',
'Montgomery',
'Modesto',
'Boise',
'Fremont',
'Irvine',
'Spokane',
'Richmond',
'Shreveport',
'Irving',
'San Bernardino', 
'Yonkers',
'Des Moines', 
'Glendale',
'Tacoma',
'Grand Rapids', 
'Huntington Beach', 
'Augusta',
'Sunrise Manor1', 
'Mobile',
'Moreno Valley', 
'Little Rock', 
'Columbus',
'Amarillo',
'Paradise1',
'Oxnard',
'Fort Lauderdale', 
'Knoxville',
'Fontana',
'Salt Lake City', 
'Newport News',
'Spring Valley1',
'Jackson',
'Tempe',
'Worcester', 
'Brownsville',
'Providence',
'Fayetteville',
'Huntsville',
'Ontario',
'Aurora',
'Rancho Cucamonga', 
'Santa Clarita',
'Chattanooga',
'Overland Park',
'Tallahassee',
'Oceanside',
'Garden Grove', 
'Vancouver',
'Grand Prairie', 
'Cape Coral',
'Rockford',
'Dayton',
'Springfield', 
'Santa Rosa',
'Pomona',
'Salem',
'Sioux Falls', 
'Port St. Lucie', 
'Corona',
'Springfield', 
'Eugene',
'Pembroke Pines', 
'Peoria',
'Paterson', 
'Pasadena',
'Hampton',
'Joliet',
'Enterprise1', 
'Lancaster',
'Salinas',
'Pasadena',
'Naperville',
'Hollywood',
'Kansas City',
'Torrance',
'Hayward',
'Palmdale',
'Lakewood',
'Alexandria',
'Syracuse',
'Bridgeport',
'Escondido',
'Metairie1',
'Orange',
'Warren',
'Fort Collins', 
'East Los Angeles1', 
'Fullerton', 
'Mesquite', 
'Elk Grove',
'Sunnyvale',
'Savannah',
'Sterling Heights', 
'McAllen',
'Coral Springs', 
'Cedar Rapids',
'Elizabeth',
'Columbia',
'Hartford',
'New Haven',
'Carrollton',
'Thousand Oaks', 
'Topeka',
'West Valley City', 
'El Monte',
'Waco',
'Cary',
'Bellevue', 
'Concord',
'Simi Valley', 
'Clarksville',
'Visalia',
'Stamford',
'Olathe',
'Provo',
'Springfield', 
'Evansville',
'Abilene',
'McKinney',
'Vallejo',
'Denton',
'Ann Arbor', 
'Lansing',
'Flint',
'Gainesville', 
'Peoria',
'Lafayette', 
'Inglewood',
'Athens',
'Killeen',
'Thornton',
'Independence', 
'Charleston',
'Santa Clara',
'Beaumont',
'Costa Mesa',
'Manchester',
'Roseville',
'Miramar',
'Downey',
'Victorville', 
'Waterbury',
'Allentown',
'Norman',
'Clearwater', 
'West Covina',
'Arvada',
'Westminster', 
'Elgin',
'South Bend', 
'Fairfield',
'Midland',
'Pueblo',
'Norwalk',
'Erie',
'Lowell',
'Burbank',
'Ventura',
'Pompano Beach', 
'West Jordan',
'Portsmouth',
'Billings',
'Wichita Falls', 
'Richmond',
'Cambridge',
'Berkeley',
'Daly City',
'Green Bay',
'High Point',
'Palm Bay'].sort();
        
                //AutoComplete_Create('email', data);
                //AutoComplete_Create('color', ['red', 'orange', 'green', 'black', 'pink', 'grey', 'mauve', 'turquoise', 'blue', 'purple'].sort(), 6);
            
