var captcha_test = "";
function change_content( too,capt )
{
 captcha_test = capt;
 document.getElementById('dobo_dc').className="";
 document.getElementById('dobo_mc').className="";
 document.getElementById('dobo_gn').className="";
 document.getElementById('dobo_wh').className="";
 document.getElementById('dobo_tr').className="";
 document.getElementById('dobo_md').className="";
 document.getElementById('dobo_pl').className="";
 document.getElementById('txt_box').innerHTML = '&nbsp;';
 document.getElementById('input_box1').style.display='none';
 document.getElementById('input_box2').style.display='none';
  
 switch(too)
 {
  case 'dc': 
  	document.getElementById('dobo_dc').className="first_activ";
	
	var ct = '<form action="/index.php" method="post" name="kontakt_form">     <input name="src" value="details" type="hidden">     <input name="id" value="401" type="hidden">     <table aling="center" border="0" width="500">	 <tr>      <td align="left" valign="top" colspan="2">       <b>Sie suchen eine Domainendung, die in Unserer Liste nicht vorhanden ist?</b><br />        <p>Senden Sie uns doch einfach, mit folgendem Formular, Ihre Domain Wünsche.</p>       <br>      </td>	 </tr>      <tr>      <td align="left" valign="top">       Name:      </td>      <td align="left" valign="top">       <input name="name" onclick="javascript:this.select();" class="kontackt_form" maxlength="60" type="text">      </td>     </tr>     <tr>      <td align="left" valign="top">       E-Mail:      </td>      <td align="left" valign="top">       <input name="email" onclick="javascript:this.select();" class="kontackt_form" maxlength="250" type="text">      </td>     </tr>     <tr>     </tr><tr>      <td align="left" valign="top">       Telefonnummer:      </td>      <td align="left" valign="top">       <input name="tel" onclick="javascript:this.select();" class="kontackt_form" maxlength="60" type="text">      </td>     </tr>      <tr>      <td align="left" valign="top">       Domain:      </td>      <td align="left" valign="top">       <input name="zusaetze[Domain]" onclick="javascript:this.select();" class="kontackt_form" maxlength="120" type="text">      </td>     </tr>     <tr>      <td align="left" valign="top">       Betreff:      </td>      <td align="left" valign="top">       <input name="betreff" onclick="javascript:this.select();" value="Domain mit nicht gelisteter Domainendung registrieren" class="kontackt_form" maxlength="200" type="text">      </td>     </tr>     <tr>      <td align="left" valign="top">       Text:      </td>      <td align="left" valign="top">       <textarea name="text" rows="6" onclick="javascript:this.select();" class="kontackt_form"></textarea>      </td>     </tr>     <tr>      <td align="left" valign="top">&nbsp;      </td>      <td align="left" valign="top">       <input name="send_kontakt_form" value=" senden " onclick="return EingabenUeberpruefen();" type="submit">      </td>     </tr>     </table>     </form>';
	document.getElementById('input_box2').style.display='block';
	document.getElementById('input_box2').innerHTML = ibo_head + ct + ibo_foot;
	
	
	document.getElementById('txt_box').innerHTML = '<p style="padding-top: 5px;">Bitte geben Sie die Bezeichnung der gewünschten Domain ein und wählen Sie dann die Domainendung aus.</p>';
//
//console.log(capt);
   if(capt == "")
   {
	   var ct = '<input type="text" id="dc_domain" value="" class="form">.<select id="dc_topleveldomain" class="form"><option value="xxx">Auswahl</option><option value="xxx">--------</option>';
   }
   else
   {
    var ct = '<div style="text-align:center;margin:10px;" id="submitRemove"> Sicherheitscode: <img src="/captcha_image.php?img='+capt+'" border="0" width="100" height="20" align="absmiddle" /><input type="text" name="captcha_pw" id="captcha_pw" size="4" maxlength="4" class="kontackt_form" style="width: 70px;" align="absmiddle" value="" /></div><input type="text" id="dc_domain" value="" class="form">.<select id="dc_topleveldomain" class="form"><option value="xxx">Auswahl</option><option value="xxx">--------</option>';
   } 
    for(i in tldlista)
	 ct = ct + '<option value="'+tldlista[i][0]+'">'+tldlista[i][0]+' (CHF '+tldlista[i][1]+' / &euro; '+tldlista[i][2]+')</option>';
	ct = ct + '<option value="xxx">--------</option>';
    for(i in tldlistgr)
	 ct = ct + '<option value="'+tldlistgr[i][0]+'">'+tldlistgr[i][1]+'</option>';
	ct = ct + '<option value="xxx">--------</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
	ct = ct + '</select><input type="button" onClick="do_check_single()" value="prüfen" class="form"><br>';

	document.getElementById('input_box1').style.display='block';
	document.getElementById('input_box1').innerHTML = ibo_head + ct + ibo_foot;
	break;
	
  case 'mc':
	document.getElementById('txt_box').innerHTML = '<p>Bitte geben Sie hier pro Zeile eine zu registrierende Domain ein.</p>';

	if(capt == "")
	{
		var ct = '<textarea style="width: 400px; height:250px;" id="dc_domains" class="textarea"></textarea><br /><input type="button" onClick="do_check_multi()" value="prüfen" class="form">';
    }
    else
    {
		var ct = '<div style="text-align:center;margin:10px;" id="submitRemove"> Sicherheitscode: <img src="/captcha_image.php?img='+capt+'" border="0" width="100" height="20" align="absmiddle" /><input type="text" name="captcha_pw" id="captcha_pwm" size="4" maxlength="4" class="kontackt_form" style="width: 70px;" align="absmiddle" value="" /></div><textarea style="width: 400px; height:250px;" id="dc_domains" class="textarea"></textarea><br /><input type="button" onClick="do_check_multi()" value="prüfen" class="form">';
	}
	document.getElementById('input_box2').style.display='block';
	document.getElementById('input_box2').innerHTML = ibo_head + ct + ibo_foot;

  	document.getElementById('dobo_mc').className="activ";
	break;
	
  case 'gn':
  	document.getElementById('dobo_gn').className="activ";
	
    var ct = '<table border="0" cellpadding="4" cellspacing="0" align="center" width="100%"><tr> <td align="left" valign="top">  <input type="text" id="kw0" class="input_200"><br />  <input type="text" id="kw1" class="input_200"><br />  <br />    <input type="submit" type="button" value="prüfen" onClick="do_generator()" class="form">   </td> <td align="left" valign="top" style=" border-left: 1px dashed #666666;">  <b>TLDs zu prüfen:</b><br />  <input type="radio" name="group" id="groups_1" onchange="own_tlds_check_genrator()" checked="checked" /> &nbsp; .de .ch .at .info .cc .li<br />  <input type="radio" name="group" id="groups_2" onchange="own_tlds_check_genrator()" /> &nbsp; .com .eu .mobi .ws .net .ag<br />  <input type="radio" name="group" id="groups_X" onchange="own_tlds_check_genrator()" /> &nbsp; Eigene<br />  <div id="own_tlds" style="display:none;"><select id="tld_l0" class="form"><option value="">Auswahl</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
    ct = ct + '</select> <br /><select id="tld_l1" class="form"><option value="">Auswahl</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
    ct = ct + '</select> <br /><select id="tld_l2" class="form"><option value="">Auswahl</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
    ct = ct + '</select> <br /><select id="tld_l3" class="form"><option value="">Auswahl</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
    ct = ct + '</select> <br /><select id="tld_l4" class="form"><option value="">Auswahl</option>';
    for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+' (CHF '+tldlistb[i][1]+' / &euro; '+tldlistb[i][2]+')</option>';
    ct = ct + '</select><br /></div> </td> </tr></table><br>';
	document.getElementById('input_box1').style.display='block';
	document.getElementById('input_box1').innerHTML = ibo_head + ct + ibo_foot; 
	document.getElementById('txt_box').innerHTML = '<p>Bitte geben Sie die Stichw&ouml;rter der gew&uuml;nschten Domain ein.</p>';
	break;

  case 'wh':
  	document.getElementById('dobo_wh').className="activ";
    
    if(capt == "")
    {
		var ct = '<table border="0" cellpadding="0" cellspacing="0"><tr><td class="small" height="40" align="center"><a>Pr&uuml;fen Sie hier, im wohl gr&ouml;ssten WHOIS Domainabfrage-System,<br />mit &uuml;ber 250 Domainendungen, die Daten von bereits registrierten Domains.</a></td></tr><tr><td align="center"><br \><input type="text" id="dc_domain" value="" class="form"><a>.</a><select id="dc_topleveldomain" class="form">';
	}
	else
	{
		var ct = '<table border="0" cellpadding="0" cellspacing="0"><tr><td class="small" height="40" align="center"><div style="text-align:center;margin:10px;"> Sicherheitscode: <img src="/captcha_image.php?img='+capt+'" border="0" width="100" height="20" align="absmiddle" /><input type="text" name="captcha_pw" id="captcha_pww" size="4" maxlength="4" class="kontackt_form" style="width: 70px;" align="absmiddle" value="" /></div><a>Pr&uuml;fen Sie hier, im wohl gr&ouml;ssten WHOIS Domainabfrage-System,<br />mit &uuml;ber 250 Domainendungen, die Daten von bereits registrierten Domains.</a></td></tr><tr><td align="center"><br \><input type="text" id="dc_domain" value="" class="form"><a>.</a><select id="dc_topleveldomain" class="form">';
	}
	for(i in tldlista)
	 ct = ct + '<option value="'+tldlista[i][0]+'">'+tldlista[i][0]+'</option>';
	ct = ct + '<option value="xxx">------------</option>';
	for(i in tldlistb)
	 ct = ct + '<option value="'+tldlistb[i][0]+'">'+tldlistb[i][0]+'</option>';
	ct = ct + '</select><input type="button" value="abfragen" onClick="do_whois()" class="form"></td></tr></table><br>';
	
	document.getElementById('input_box1').style.display='block';
	document.getElementById('input_box1').innerHTML = ibo_head + ct + ibo_foot; 
	document.getElementById('txt_box').innerHTML = '<p>Bitte geben Sie die zu prüfende Domain an....</p>';
	break;

  case 'tr':
  	document.getElementById('dobo_tr').className="activ";
    var ct = '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"><tr><td align="center"><br \><a>Bitte geben Sie hier pro Zeile eine zu transferierende Domain ein</a> </td></tr><tr> <td align="center">  <br \>  <textarea style="width: 400px; height:250px;" id="dc_domains" class="textarea"></textarea><br /><input type="button" value="prüfen" onClick="do_transfer()" class="form"><a href="/ger_details_1827/Domain_und_Homepage-Umzug_zu_Movetec_-_leicht_gemacht.html" target="_blank">Information</a></td></tr></table><br>';
	document.getElementById('input_box2').style.display='block';
	document.getElementById('input_box2').innerHTML = ibo_head + ct + ibo_foot; 
	document.getElementById('txt_box').innerHTML = '<p>Bitte geben Sie die zu transferienden Domains an....</p>';
	
	break;

  case 'md':
  	document.getElementById('dobo_md').className="activ";
	
	document.getElementById('input_box2').style.display='block';
	document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
	document.getElementById('txt_box').innerHTML = '<p>Movetec Domain Preisliste wird geladen....</p>';
	
	sendRequest( '/index.php?src=domain_uebers&do_utf8=1&_main_tpl_file=domain_uebers.tpl', '', 0 , 6);
	break;

  case 'pl':
  	document.getElementById('dobo_pl').className="activ";
	
	document.getElementById('input_box2').style.display='block';
	document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
	document.getElementById('txt_box').innerHTML = '<p>Movetec Domain Preisliste wird geladen....</p>';
	
	sendRequest( '/index.php?src=domain_preisliste&do_utf8=1&_main_tpl_file=domain_preisliste.tpl', '', 0 , 7);
	
	break;

 }

}

function processData( xmlHttp, intID )
{
 switch(intID)
 {
  case 1: 
   document.getElementById('input_box2').innerHTML = ibo_head + '<div align="left" style="margin-left: 5px;">' + xmlHttp.responseText + '<br></div>' + ibo_foot; 
   var js_base = document.getElementById('js_base'); 
   if (typeof js_base != "undefined" && js_base != null)
    eval(js_base.innerHTML);

   update_price_check();
   check_wdms_check();
   break;
 
  case 3: 
   document.getElementById('input_box2').innerHTML = ibo_head + '<div align="left" style="margin-left: 5px;">' + xmlHttp.responseText + '<br></div>' + ibo_foot; 
   var js_base = document.getElementById('js_base'); 
   if (typeof js_base != "undefined" && js_base != null)
    eval(js_base.innerHTML); 
	
   start_it_genrator(); /* window.onload =  */
   own_tlds_check_genrator();
   break;
 
  case 4:
   document.getElementById('input_box2').innerHTML = ibo_head + '<div align="left" style="margin-left: 25px;">' + xmlHttp.responseText + '<br></div>' + ibo_foot;
   break;
   
  case 5: 
   document.getElementById('input_box2').innerHTML = ibo_head + '<div align="left" style="margin-left: 5px;">' + xmlHttp.responseText + '<br></div>' + ibo_foot; 
   var js_base = document.getElementById('js_base'); 
   if (typeof js_base != "undefined" && js_base != null)
    eval(js_base.innerHTML); 

   break;
   
  case 6:
   document.getElementById('txt_box').innerHTML = '<p>Ihre Domains.</p>';
   document.getElementById('input_box2').innerHTML = ibo_head + xmlHttp.responseText + ibo_foot; 
   break;
   
  case 7:
   document.getElementById('txt_box').innerHTML = '<p>Movetec Domain Preisliste.</p>';
   document.getElementById('input_box2').innerHTML = ibo_head + xmlHttp.responseText + ibo_foot; 
   break;
   
  case 101:
   update_wdms_genrator( xmlHttp.responseText );
   break;
   
  case 102:
   update_wdms_check( xmlHttp.responseText );
   break;
 
 }
}

function do_whois()
{
	
 if(document.getElementById('captcha_pww') != null)
 {
	sendRequest( '/index.php?src=whois&do_utf8=1&_main_tpl_file=whois_plain.tpl&doit=1&topleveldomain='+escape(document.getElementById('dc_topleveldomain').value)+'&domain=' +escape(document.getElementById('dc_domain').value) , '', 0 , 4)+'&captcha_pw=' +escape(document.getElementById('captcha_pww').value);
 }
 else
 {
	 sendRequest( '/index.php?src=whois&do_utf8=1&_main_tpl_file=whois_plain.tpl&doit=1&topleveldomain='+escape(document.getElementById('dc_topleveldomain').value)+'&domain=' +escape(document.getElementById('dc_domain').value) , '', 0 , 4);
 }

 document.getElementById('input_box2').style.display='block';
 document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
}

function do_transfer()
{
 var url = '/index.php?src=domain_transfer&do_utf8=1&_main_tpl_file=domain_transfer.tpl&domaincheck=1&first_time=1&domains=' +escape(document.getElementById('dc_domains').value); 
 sendRequest( url , '', 0 , 5);
                
 document.getElementById('input_box2').style.display='block';
 document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
}

function do_generator()
{
 var url = '/index.php?src=domain_generator&do_utf8=1&_main_tpl_file=domain_genrator.tpl&domaincheck=1&kw[0]='+escape(document.getElementById('kw0').value)+'&kw[1]='+escape(document.getElementById('kw1').value);
 
 if (document.getElementById('groups_1').checked==true)
  url = url + '&group=1';
 else if (document.getElementById('groups_2').checked == true)
  url = url + '&group=2';
 else if (document.getElementById('groups_X').checked==true) {
  url = url + '&group=X';
  url = url + '&tld_l[0]=' + escape(selectWert(document.getElementById('tld_l0')));
  url = url + '&tld_l[1]=' + escape(selectWert(document.getElementById('tld_l1')));
  url = url + '&tld_l[2]=' + escape(selectWert(document.getElementById('tld_l2')));
  url = url + '&tld_l[3]=' + escape(selectWert(document.getElementById('tld_l3')));
  url = url + '&tld_l[4]=' + escape(selectWert(document.getElementById('tld_l4')));
 } 

 sendRequest( url, '', 0 , 3);

 document.getElementById('input_box2').style.display='block';
 document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
}

function do_check_single()
{
 //
 if(document.getElementById('captcha_pw') != null)
 {
 var url = '/index.php?src=check_domain&do_utf8=0&_main_tpl_file=domain_check.tpl&domaincheck=1&topleveldomain='+escape(document.getElementById('dc_topleveldomain').value)+'&domain=' +escape(document.getElementById('dc_domain').value)+'&captcha_pw=' +escape(document.getElementById('captcha_pw').value);
}
else
{
	var url = '/index.php?src=check_domain&do_utf8=1&_main_tpl_file=domain_check.tpl&domaincheck=1&topleveldomain='+escape(document.getElementById('dc_topleveldomain').value)+'&domain=' +escape(document.getElementById('dc_domain').value);
}
 sendRequest( url, '', 0 , 1);
 if(document.getElementById('captcha_pw') != null)
 {
 document.getElementById("submitRemove").style.display = "none";
 var arr = document.getElementsByName("captcha_pw");
 for(var i in arr)
 {
	arr[i].name = "captcha_nix";
	
 }
}
 document.getElementById('input_box2').style.display='block';
 document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
}

function do_check_multi()
{
 //
 if(document.getElementById('captcha_pwm') != null)
 {
 var url = '/index.php?src=check_domain&do_utf8=0&_main_tpl_file=domain_check.tpl&domaincheck=1&domains=' +escape(document.getElementById('dc_domains').value)+'&captcha_pw=' +escape(document.getElementById('captcha_pwm').value);
$(".submitRemove").remove();
}
else
{
	var url = '/index.php?src=check_domain&do_utf8=1&_main_tpl_file=domain_check.tpl&domaincheck=1&domains=' +escape(document.getElementById('dc_domains').value);
}
 sendRequest( url, '', 0 , 1);

 document.getElementById('input_box2').style.display='block';
 document.getElementById('input_box2').innerHTML = ibo_head + ibo_wait + ibo_foot; 
}
