// Funktion zum ausfuehren der Newsletter-Anmeldung:
function newsletterReg(){
	var nlVal = findObj('newsletterEmail').value;
	if(nlVal.length > 0 && nlVal != ' E-Mail eingeben'){
		findObj('newsletterMail').value = nlVal;
		findObj('nlform').submit();
		findObj('newsletterReg').innerHTML = 'Sie erhalten in Kürze eine Best&auml;tigungsmail.';
	}
}


var url_root;
var http_url_root;

//var url_root = "http://de.samsungmobile.com/";	
//	var http_url_root = "http://de.samsungmobile.com/";	

function setBaseurl(urlSubdomain, urlLanguage){
		url_root = 'http://' + urlSubdomain + '.samsungmobile.com/' + urlLanguage;
		http_url_root = url_root;
}

function goHome(){
	document.location.href = http_url_root;//'http://de.samsungmobile.com/';
}

function goMenu(menu1,menu2,menu3,menu4){
		if(menu1==null) menu1="";
		if(menu2==null) menu2="";
		if(menu3==null) menu3="";
		if(menu4==null) menu4="";

		document.location.href = url_root+"gomenu.jsp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3 + "&menu4=" + menu4;
	}
	
function openCenteredPopup(width, height, url){	
	var l = (screen.availWidth/2) - (width/2);
	var t = (screen.availHeight/2) - (height/2);
	var winSet = 'width='+width+',height='+height+',left='+l+',top='+t+',status=no,scrollbars=no,resizable=no,location=no,menubar=no,toolbar=no,fullscreen=no,dependent=no';
	winRef = window.open(url, name, winSet);
	winRef.focus();
	return winRef;
}

function checkScreenSize(){
	var sWidth = screen.availWidth;
	var smallLayoutThreshold = 1280;
	
	if(sWidth <= smallLayoutThreshold){
		return 'small';	
	} else {
		return 'full';	
	}
	
}

function useCss(cssPath){
	document.write('<link rel="stylesheet" type="text/css" href="' + cssPath + '" />');	
}

function showTerms(){
		openCenteredPopup(560, 380, '/flash/terms/terms.php');
}

