//////////////////////////////////////////////////////
//													//
//					JS-Functions					//
//													//
//////////////////////////////////////////////////////


/////////////////////////////////////////////////////
//	Resize handler to prevent the Netscape Resize-Bug
/////////////////////////////////////////////////////
if(document.ids)window.onLoad=function(){
	var origWidth=innerWidth;
	var origHeight=innerHeight;
	function initResize(){onResize=
	function(){
	if((innerWidth!=origWidth)||
		(innerHeight!=origHeight))
		self.location.href=location.href;}}
	initResize();}

/////////////////////////////////////////////////////
//	Start Shaped Advertising
/////////////////////////////////////////////////////
function startad() {
	var x = document.getElementById("advertising");
	setTimeout('document.getElementById("advertising").style.visibility = "visible";',2000);
}
function endad() {
	var x = document.getElementById("advertising");
	x.style.visibility = "hidden";
}

/////////////////////////////////////////////////////
// Confirm on submit
/////////////////////////////////////////////////////
function confirmSubmit(frmObj) { 
	var ret = true;
	var false_fields = "";
	var i=0;
	// all characters except letters (germany), numbers, point, comma, underline, hyphen, @
	var pattern=new RegExp("[^ @:!?&=€üÜöÖäÄß\.a-zA-Z0-9,_\/-]", "gi");
	var result=null;
	while (frmObj.elements[i]) {
		// for 'text'-elements with name
		if (frmObj.elements[i].name != "" && frmObj.elements[i].type == "text"){
		  	//debug:
			//alert(i + ": " + frmObj.elements[i].value + " --- type: " + frmObj.elements[i].type);
			//search for illegal characters
			if (result=pattern.exec(frmObj.elements[i].value) != null){
				//if search was successful - set return on 'false' and add the element name, 
				//where illegal character was found, to message string
				ret=false;
				false_fields = false_fields + "'" + frmObj.elements[i].name + "', ";
			}
		}
		i++;
	}
	if (ret==false) {
		// remove the two last character
		false_fields = false_fields.substr(0,false_fields.length-2);
		// error message
		alert ("Das Eingabefeld "+ false_fields +" enthält unzulässige Zeichen. Bitte überprüfen Sie Ihre Angaben!");
	}
	// confirmation
	if (ret == true && confirm("Sind Sie sicher, daß Sie diesen Eintrag speichern wollen?")) return true; 
 	else return false; 
}

/////////////////////////////////////////////////////
// Confirm on delete
/////////////////////////////////////////////////////
function confirmDelete(){
	if (confirm("Eminmisiniz? Evet tiklarsaniz bu Parça silinecek!")) return true; 
 	else return false; 
}

function banac(){
	if (confirm("Eminmisiniz? Bu rumuzu açmaya!")) return true; 
 	else return false; 
}

function smilial(){
	if (confirm("Eminmisiniz? Bu rumuzdan Smili kullanma yetkisini almaya?!")) return true; 
 	else return false; 
}

function smiliver(){
	if (confirm("Eminmisiniz? Bu rumuzua Smili kullanma yetkisini vermeye?!")) return true; 
 	else return false; 
}



function banla(){
	if (confirm("Eminmisiniz? Bu rumuzu banlamaya!")) return true; 
 	else return false; 
}

function ozelsil(){
	if (confirm("Eminmisiniz? Bu rumuzun Özel Üyeligini silmeye?")) return true; 
 	else return false; 
}


function aktifet(){
	if (confirm("Eminmisiniz? Bu rumuzu Aktife etmeye!")) return true; 
 	else return false; 
}

function rumuzsil(){
	if (confirm("Eminmisiniz? Bu rumuzu Sistemden Silmeye?")) return true; 
 	else return false; 
}

function dedikodusil(){
	if (confirm("Eminmisiniz? Bu Dedikoduyu Sistemden Silmeye?")) return true; 
 	else return false; 
}

function dedikoonayla(){
	if (confirm("Eminmisiniz? Bu Dedikoduyu Onaylamaya?")) return true; 
 	else return false; 
}

function dedikoonaykaldir(){
	if (confirm("Eminmisiniz? Bu Dedikoduyunun Onayını Kaldırmaya?")) return true; 
 	else return false; 
}

/////////////////////////////////////////////////////
// Popup opener
/////////////////////////////////////////////////////
function popUp0(seite1) 
   { 
   var eigenschaft,sbreite,shoehe,fenster01; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite1, 'errmsg', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=480, height=166, left=240, top=120'); 
   }; 
  
function popUp1(seite1) 
   { 
   var eigenschaft,sbreite,shoehe,fenster01; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite1, 'NewWindows1', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=480, height=166, left=240, top=0'); 
   }; 

function popUp2(seite2) 
   { 
   var eigenschaft,sbreite,shoehe,fenster02; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite2, 'NewWindows2', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=550, height=480, left=120, top=120'); 
   }; 
   
function popUp3(seite3) 
   { 
   var eigenschaft,sbreite,shoehe,fenster03; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite3, 'NewWindows3', 'toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1000, height=600, left=120, top=120'); 
   }; 
   
function popUp4(seite,breite,hoehe) 
   { 
   var eigenschaft,sbreite,shoehe,fenster03; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite, 'NewWindows4', 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=' + breite + ', height=' + hoehe + ', left=60, top=60'); 
   }; 

function popUp5(seite5) 
   { 
   var eigenschaft,sbreite,shoehe,fenster05; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite5, 'NewWindows5', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=416, height=416, left=125, top=125'); 
   }; 

function popUp6(seite6) 
   { 
   var eigenschaft,sbreite,shoehe,fenster06; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite6, 'NewWindows6', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=415, height=500, left=100, top=100'); 
   }; 
   
function popUp7(seite,breite,hoehe) 
   { 
   var eigenschaft,sbreite,shoehe,fenster07; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite, 'NewWindows7', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=' + breite + ', height=' + hoehe + ', left=60, top=60'); 
   }; 
   
   
   function popUp8(seite,breite,hoehe) 
   { 
   var eigenschaft,sbreite,shoehe,fenster08; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=492; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+100; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite, 'NewWindows7', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=' + breite + ', height=' + hoehe + ', left=60, top=60'); 
   }; 
   
   
      function popUp9(seite,breite,hoehe) 
   { 
   var eigenschaft,sbreite,shoehe,fenster09; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=760; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+600; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite, 'NewWindows9', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=' + breite + ', height=' + hoehe + ', left=80, top=80'); 
   }; 
   
   function popUpo(seite,breite,hoehe) 
   { 
   var eigenschaft,sbreite,shoehe,fenster03; 
  
   //get screen resolution: 
   var ns6=(!document.all && document.getElementById); 
   var ie4=(document.all); 
   var ns4=(document.layers);

if(ns6||ns4) 
      { 
      sbreite = innerWidth; 
      shoehe = innerHeight; 
      } else if(ie4) 
         { 
         sbreite = document.body.clientWidth; 
         shoehe = document.body.clientHeight; 
         } 
  
   fensterbreite=800; //fensterbreite=outerWidth; open full width 
   shoehe=shoehe+635; 
   x=(sbreite-fensterbreite); 

   popUp=window.open(seite, 'NewWindows10', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=' + breite + ', height=' + hoehe + ', left=120, top=120'); 
   }; 