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"; versionNav = navigator.appVersion; placeMSIE5 = versionNav.indexOf("MSIE 5"); function setPointer(theRow, thePointerColor) { if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') { return false; } var row_cells_cnt = theRow.cells.length; for (var c = 0; c < row_cells_cnt; c++) { if(theRow.cells[c].background=="") theRow.cells[c].bgColor = thePointerColor; } return true; } function confirmdelete(myurl) { userInput = confirm('Etes-vous sur(e)\nde vouloir supprimer cet item ?'); if (userInput != '' && userInput != null) { document.location.href=myurl; } } function HomePage(obj) { obj.style.behavior='url(#default#homepage)'; obj.setHomePage('www.toto.com'); } function jumpPage(form) { a = form.welcome.selectedIndex; if (form.welcome.options[a].value != "") { document.location.href = form.welcome.options[a].value; } } function mailingliste() { document.mylist.submit(); } function sondage() { var sondage=document.sondage; var total = 0; for (var i = 0; i < sondage.propo.length; i++) { if (sondage.propo[i].checked == true) { total += 1; } } if(total==0) { alert("You must at least select one proposal !"); } else { sondage.submit(); } } function SetCookie(cookieName,cookieValue,nYears) { var today = new Date(); var expire = new Date(); if (nYears==null || nYears==0) nYears=1; expire.setTime(today.getTime() + 3600000*24*365*nYears); document.cookie = cookieName+"="+escape(cookieValue)+";path=/;expires="+expire.toGMTString(); } function mysearch() { if (document.elektrosearch.searchstring.value != "") { document.elektrosearch.submit(); } } 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 ouvre(name) { openwin(name,"windowelkradio",250,100,"no","no","no","no","no","no"); } function actionChecksubmit() { sEinzugeben=""; if (document.suggestion.myurl.value=="") { sEinzugeben+="- URL\n"; } if (document.suggestion.titre.value=="") { sEinzugeben+="- Title of the site\n"; } if (document.suggestion.nom.value=="") { sEinzugeben+="- Your nickname\n"; } if (document.suggestion.des.value=="") { sEinzugeben+="- Courte description\n"; } if (document.suggestion.email.value.indexOf('@')==-1) { if (document.suggestion.email.value.indexOf('.')==-1) { sEinzugeben+="- Your email\n"; } } if(sEinzugeben!="") { alert("The following fields are not filled properly:\n"+sEinzugeben); } else { document.suggestion.submit(); } } function actionCheckSubmitDisc() { sEinzugeben=""; if (document.suggestion.nomartiste.value=="") { sEinzugeben+="- Artist's name\n"; } if (document.suggestion.title.value=="") { sEinzugeben+="- Title\n"; } if (document.suggestion.nomlabel.value=="") { sEinzugeben+="- label's name\n"; } if (document.suggestion.note.value=="") { sEinzugeben+="- Your note\n"; } if(sEinzugeben!="") { alert("The following fields are not filled properly:\n"+sEinzugeben); } else { document.suggestion.submit(); } } function actionCheckSubmitAudio() { sEinzugeben=""; if (document.suggestion.nomartiste.value=="") { sEinzugeben+="- Artist's name\n"; } if (document.suggestion.title.value=="") { sEinzugeben+="- Title\n"; } var nbtracks = document.suggestion.nbtracks.value; for(var i=0; i 0) { return (parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) ) >=4) && (ua.indexOf("MSIE 4.0b") <0) ; } else { return false; } } function adddesktop() { if (isMsie4orGreater()) { var mywidth=screen.width; var myheight=screen.height; if(myheight<660) { alert("La resolution de ton ecran doit etre au minimum de 1024x780 !!"); } else { window.external.AddDesktopComponent("http://www.elektrolink.com/calendar/calendar.htm","website",0,0,mywidth,myheight); } } else { alert("Impossible d'installer l'active desktop sur ta machine !!"); } } function noSpam(user,domain) { locationstring = "mailto:" + user + "@" + domain; window.location = locationstring; } var monthLength = new Array(31,28,31,30,31,30,31,31,30,31,30,31); function checkDate(day,month,year) { var x = document.forms[0].elements; var day = parseInt(day); var month = parseInt(month); var year = parseInt(year); if (!day || !month || !year) return false; if (year/4 == parseInt(year/4)) monthLength[1] = 29; if (day > monthLength[month-1]) return false; monthLength[1] = 28; var now = new Date(); now = now.getTime(); var dateToCheck = new Date(); dateToCheck.setYear(year); dateToCheck.setMonth(month-1); dateToCheck.setDate(day); var checkDate = dateToCheck.getTime(); var futureDate = ((now < checkDate) || (now = checkDate)); var pastDate = (now > checkDate); return futureDate; }