// Browser Detection
isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
isIE = (document.all ? true : false);
IEmac = (isIE && isMac) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = (isIE && (navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
isDOM = (document.getElementById ? true : false);

//Load CSS
if (isIE){
	document.write("<link rel='stylesheet' type='text/css' href='/_data/media_layout/snv/ie.css'>");
}

//E-Mail Validator
function checkEmail(address) {
	//var reg_email = /^.+@.+\..{2,}$/;
	var reg_email = /^[\w](([_\.-]?[\w]+)*)@([\w]+)(([\.-]?[\w]+)*)\.([A-Za-z]{2,})$/;
	if (! reg_email.exec(address))
		return true;
	else
		return false;
}

//Open New Window
function OpenWindow(url,name) {
 window.open(url,name,"width=604,height=500,left=0,top=0,scrollbars=yes,status=yes");
}

//Formular Functions
function clearTxtArea(textarea) {
  	textarea.value = '';
}
function clearFrm(form) {
 	for(i=0; i <= form.length -1; ++i) {
 		form[i].style.backgroundColor = '#FFE3CC';
	}
}
//Email Adress
function SendMail(domain,name) {
    window.location = 'mailto:'+name+String.fromCharCode(64)+domain;
}
