var VersionAllSync = "3.4.56"
var VersionAllDup = "3.2.0"
var VersionGetFoldersize = "2.3.2"

var Slogan = "AllSync";

window.defaultStatus = Slogan; //"AllSync - Dateisynchronisation und Datensicherung"


/* IE4 Stylesheet laden */
if (document.all)
{
	if(navigator.appVersion.indexOf("MSIE 4")>-1)
		document.createStyleSheet('/css_web_ie4.css');
}


function SetStatus(mText) {
	
	if (String(mText) == "undefined")
		status = Slogan;
	else
		status = mText;
	
}

function SetStat(obj) {

	if(document.all){
	     window.status = obj.innerText;
	} else{
	    window.status = obj.textContent;
	}	

}

function CopyToClipboard(id) {
	
   document.getElementById(id).focus();
   document.getElementById(id).select();
   CopiedTxt = document.selection.createRange();
   CopiedTxt.execCommand("Copy");
}



var ASP = "http://www.thummerer-software-design.de/asp/"
var Lokal = "http://localhost/asp/"
var URL = ASP;

function LogOnReg(){
	Offline();
	top.location.href = URL + "regb.asp"
}

function LogOnRegEng(){
	Offline();
	top.location.href = URL + "regb_eng.asp"
}

function LogOnReseller(){
	
	Offline();
	top.location.href = URL + "reseller.asp"
}

function LogOnResellerEng(){
	
	Offline();
	top.location.href = URL + "reseller_eng.asp"
}

function JumpToNewsletter(){
	
	Offline();
	top.location.href = URL + "newsletter.asp"
}

function Offline(){
	
	if ( document.location.href.substr(0,15).toLowerCase() == "http://192.168." || document.location.href.substr(0,16).toLowerCase() == "http://localhost")
		URL = Lokal;
	else
		URL = ASP;
}

function Offline1(){
	
	var tmp;
	tmp = document.location.href
	
	if ( tmp.substr(0,15).toLowerCase() == "http://192.168.")
	{
		URL = Lokal;
		var Ergebnis = tmp.match("http://([^/]*)/");
		alert(Ergebnis);
		var test = Ergebnis.search(/,/);
		alert(test);
	}
	else 
	{
		if ( tmp.substr(0,16).toLowerCase() == "http://localhost")
		{
		var Ergebnis = tmp.match("http://([^/]*)/");
		alert(Ergebnis);
		var test = Ergebnis.search(",");
		alert(test);
		URL = Lokal;
		}
		else
		{
			URL = ASP;
		}
	}
}




/* **************** */
/* FORMULAR weiterempfehlen */
/* **************** */

function CheckEingaben()
{
	
	if (document.form1.mitteilung.value == "" || document.form1.name1.value == ""  || document.form1.email.value == "" || document.form1.emailEmp.value == "" || document.form1.nameEmp.value == "")
		alert("Füllen Sie bitte alle Textfelder aus!");
	else
	{

		document.form1.submit();
						
	}
}

var SpamCode = 816;

var CheckEmail = "Die Emailbestätigung ist nicht korrekt!";
var CheckSpam = "Spamschutz: Der eingegebene Zahlencode ist nicht korrekt!";
var CheckFeld = "Füllen Sie bitte alle Textfelder aus, die mit einem Stern (*) markiert sind.";

var CheckEmailEN = "Your e-mail address does not match in the Email and Email Verify fields!";
var CheckSpamEN = "The code of the spam protection does not match!";
var CheckFeldEN = "Fields with * must be completed to process your request!";

/* **************** */
/* FORMULAR Kontakt */
/* **************** */

function CheckEingabenKontaktEN()
{
	
	if (document.form1.securetext.value == "" || document.form1.betreff.value == "" || document.form1.mitteilung.value == "" || document.form1.name1.value == ""  || document.form1.email.value == "" || document.form1.email2.value == "")
		alert(CheckFeldEN);
	else
	{
		if (document.form1.email.value != document.form1.email2.value)
			alert(CheckEmailEN);
		else
		{
			if (document.form1.securetext.value != SpamCode)
				alert(CheckSpamEN);
			else
				document.form1.submit();
		}
	}
}

function CheckEingabenKontakt()
{
	
	if (document.form1.securetext.value == "" || document.form1.betreff.value == "" || document.form1.mitteilung.value == "" || document.form1.name1.value == ""  || document.form1.email.value == "" || document.form1.email2.value == "")
		alert(CheckFeld);
	else
	{
		if (document.form1.email.value != document.form1.email2.value)
			alert(CheckEmail);
		else
		{
			if (document.form1.securetext.value != SpamCode)
				alert(CheckSpam);
			else
				document.form1.submit();
		}
	}
}


/* **************** */
/* FORMULAR Support */
/* **************** */

function CheckEingabenSupportEN()
{
	
	if (document.form1.securetext.value == "" || document.form1.betreff.value == "" || document.form1.os.value == "" || document.form1.version.value == "" || document.form1.mitteilung.value == "" || document.form1.name1.value == ""  || document.form1.email.value == "" || document.form1.email2.value == "")
		alert(CheckFeldEN);
	else
	{
		if (document.form1.email.value != document.form1.email2.value)
			alert(CheckEmailEN);
		else
		{
			if (document.form1.securetext.value != SpamCode)
				alert(CheckSpamEN);
			else
				document.form1.submit();
		}
	}
}

function CheckEingabenSupport()
{
	
	if (document.form1.securetext.value == "" || document.form1.betreff.value == "" || document.form1.os.value == "" || document.form1.version.value == "" || document.form1.mitteilung.value == "" || document.form1.name1.value == ""  || document.form1.email.value == "" || document.form1.email2.value == "")
		alert(CheckFeld);
	else
	{
		if (document.form1.email.value != document.form1.email2.value)
			alert(CheckEmail);
		else
		{
			if (document.form1.securetext.value != SpamCode)
				alert(CheckSpam);
			else
				document.form1.submit();
		}
	}
}
