var OS = 'Win';var version = "n";browserVer=navigator.appVersion;App = navigator.appName;var Version=browserVer.substring(0,1);var posOS = navigator.appVersion.indexOf('Mac');var posOS2 = navigator.appVersion.indexOf('Win');if (posOS >= 0) OS = 'Mac';if ((posOS < 0) && (posOS2 >= 0)) OS = 'Win';if (App == "Netscape" && Version >= 3) version = "n3";var isDOM      = (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.createElement) != 'undefined') ? 1 : 0;var isIE4      = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4) ? 1 : 0;var isNS4      = (typeof(document.layers) != 'undefined') ? 1 : 0;var capable    = (isDOM || isIE4 || isNS4) ? 1 : 0;if (capable) {	if (typeof(window.opera) != 'undefined') {		capable = 0;	} else if (typeof(navigator.userAgent) != 'undefined') {		var browserName = ' ' + navigator.userAgent.toLowerCase();		if (browserName.indexOf('konqueror') > 0) {			capable = 0;		}	}}function openwin(name,myname,mywidth,myheight,mytool,mydir,mystatus,myscroll,myresize,mymenu) {	mytop=Math.floor((screen.height/2) - (myheight/2));	myleft=Math.floor((screen.width/2) - (mywidth/2));	if (version != "n3" && OS != 'Mac') debute = window.open(name,"vote","toolbar="+mytool+",width="+mywidth+",height="+myheight+",directories="+mydir+",status="+mystatus+",scrollbars="+myscroll+",top="+mytop+",left="+myleft+",resizable="+myresize+",menubar="+mymenu)	if (OS == 'Mac') debute = window.open(name,myname,"toolbar="+mytool+",width="+mywidth+",height="+myheight+",directories="+mydir+",status="+mystatus+",scrollbars="+myscroll+",top="+mytop+",left="+myleft+",resizable="+myresize+",menubar="+mymenu)	if (version == "n3") {		debute = window.open(name,myname,"toolbar="+mytool+",width="+mywidth+",height="+myheight+",directories="+mydir+",status="+mystatus+",scrollbars="+myscroll+",top="+mytop+",left="+myleft+",resizable="+myresize+",menubar="+mymenu)		debute.focus();	}}function popup(myurl,mywidth,myheight) {	openwin(myurl,"popup",mywidth,myheight,0,0,0,0,0,0);}var agt = navigator.userAgent.toLowerCase();var is_ie	   = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));var is_opera  = (agt.indexOf("opera") != -1);var is_mac	   = (agt.indexOf("mac") != -1);var is_mac_ie = (is_ie && is_mac);var is_win_ie = (is_ie && !is_mac);var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);var is_gecko  = (navigator.product == "Gecko");function checkSupportedBrowser() {	if (is_gecko) {		if (navigator.productSub < 20021201) {			return false;		}		if (navigator.productSub < 20030210) {			return false;		}	}	return is_gecko || (win_ie_ver >= 5.5);}function check_email(value) {    email_type = /^[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9_\.-]*\.([a-z]{2}|com|org|net|mil|gov|edu|biz|info|name)$/i;    if (!email_type.test(value)) {        return false;    } else {        return true;    } }function check_date(value) {	var date_type = /^([0-9]{2})(\/|-)([0-9]{2})(\/|-)([0-9]{4})$/i;	if (!date_type.test(value)) {        return false;    } else {    	var tempdate = value.split("/");		if((tempdate.length != 3) || isNaN(parseInt(tempdate[0])) || isNaN(parseInt(tempdate[1])) || isNaN(parseInt(tempdate[2]))) return false;		var newdate = new Date(eval(tempdate[2]),eval(tempdate[1])-1,eval(tempdate[0]));		var annee = newdate.getYear()  		if ((Math.abs(annee)+"").length < 4) annee = annee + 1900  		return ((newdate.getDate() == eval(tempdate[0])) && (newdate.getMonth() == eval(tempdate[1])-1) && (annee == eval(tempdate[2])));    }}
