var winopts = "toolbar=no,location=no,directories=no,status=no" + ",menubar=no,resizable=yes,scrollbars=yes" + ",copyhistory=no"; var cadena=''; function opwindow(spk,v,player,sid,stitle,AID){ var sp=spk; var v=v; var sid=sid; opts = winopts + ",width=760,height=500"; template = "webcaster/template/player.asp?id="+sp+"&q="+v+"&v="+player+"&webcast=&CID=&CLID=&AID="+AID; template = "pop_up_bio.asp?sid="+sid+"&id="+sp+"&q="+v+"&v="+player+"&webcast=&CID=&CLID=&AID="+AID; if(document.layers){ webcast = window.open(template, "CtrlWindow", opts); }else{ webcast = window.open(template, "CtrlWindow", opts); webcast.focus(); //webcast =openChromeslessWindow(template,'webcast',760,500,null,null,stitle, '#000000', '#000000', '#999988', '#808040' ,true,'Verdana, Arial, Helvetica, sans-serif', '1','#000000') } } function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i1){ for (var i=0; i< radioGrp.length;i++) { //alert("value" + i + "= " + radioGrp[i].checked); if(radioGrp[i].checked == true) { tempresult = true; } } } else { if (radioGrp.checked == true){ tempresult = true; } } return tempresult; } // ** START VERIFY FORM FUNCTIONS function goSearch(){ var result = true; var keyword = document.searchform.keyword; if (keyword.value == ""){ result=false; alert("Please enter at least one word to search for."); keyword.focus(); } else { document.searchform.submit(); } return result; } function saveBookmark() { var bookmarkname = document.bookmark.bookmarkname; var result = true; if (bookmarkname.value == "") { result = false; alert("Please Enter a name for your bookmark before clicking the 'Save' button.\nOr choose 'Close window' to close this window without saving a bookmark."); bookmarkname.focus(); } return result; } function saveNote() { var notename = document.note.notename; var result = true; if (notename.value == "") { result = false; alert("Please enter a note before clicking the 'Save' button.\nOr choose 'Close window' to close this window without saving a note."); notename.focus(); } return result; } function verifyclaimcertificate() { var toclaimstring = document.claimcertificate.toclaim; var totalselected = 0; var result = false; if (toclaimstring.length>1){ for (var i=0; i< toclaimstring.length;i++) { if(toclaimstring[i].checked == true) { totalselected = totalselected + 1; } } } if (totalselected == 4){ alert("A new window will open with your certificate.\nPlease print it and keep it for your records."); result = true; } else{ result = false; alert("You need at least, or maximum 4 presentations for 1 certificate.\nPlease reconsider your selection."); } return result; } function verifyRegister() { var name = document.register.NAME; var surname = document.register.SURNAME; var username = document.register.USERNAME; var password = document.register.PASSWORD; var email = document.register.EMAIL; var secretquestion = document.register.SECRETQUESTION; var secretanswer = document.register.SECRETANSWER; var result = true; if (name.value == "" ) { result = false; alert("Please enter your name"); name.focus(); } else if (surname.value == "" ) { result = false; alert("Please enter your surname"); surname.focus(); } else if (username.value == "" ) { result = false; alert("Please enter a username"); usernamename.focus(); } else if (password.value == "" ) { result = false; alert("Please enter a password"); password.focus(); } else if (email.value == "" ) { result = false; alert("Please enter a valid email address"); email.focus(); } return result; } function verifyRegisterCME() { var title = document.register.M_title; var degree = document.register.IDdegree; var name = document.register.m_name; var surname = document.register.m_surname; var speciality = document.register.IDspecialty; // var organization = document.register.organization; var address1 = document.register.address_1; var city = document.register.m_city; var country = document.register.M_country; var postalcode = document.register.postalcode; var email = document.register.m_email; // var password = document.register.PASSWORD; var secretquestion = document.register.SECRETQUESTION; var secretanswer = document.register.SECRETANSWER; var result = true; /* if (title.value == "none") { result = false; alert("Please select a title before continuing."); title.focus(); } else if (degree.value == "none") { result = false; alert("Please specify a degree."); degree.focus(); } */ if (name.value == "") { result = false; alert("Please enter your first name"); name.focus(); } else if (surname.value == "") { result = false; alert("Please enter your last name"); surname.focus(); } else if (speciality.value == "none") { result = false; alert("Please specify a speciality."); speciality.focus(); } /* else if (organization.value == "") { result = false; alert("Please enter an organization, affiliation or institute."); organization.focus(); } */ else if (address1.value == "") { result = false; alert("You forgot your address!"); address1.focus(); } else if (city.value == "") { result = false; alert("Please indicate the city you live in"); city.focus(); } else if (country.value == "none") { result = false; alert("Please select a country from the list"); country.focus(); } else if (postalcode.value == "") { result = false; alert("Please enter your postal code."); postalcode.focus(); } else if (email.value == "") { result = false; alert("Please enter a valid e-mail address."); email.focus(); } /* else if (password.value == "") { result = false; alert("Your password may not be blank.\nPlease enter a password."); password.focus(); } */ else if (secretquestion.value == "") { result = false; alert("A secret question allows you to retrieve your password should you forget it.\nIt should not be blank.\nPlease specify a question."); secretquestion.focus(); } else if (secretanswer.value == "") { result = false; alert("Your secret answer may not be blank.\nPlease specify an answer."); secretanswer.focus(); } return result; } function verify_pwd() { var currentpwd = document.forms[0].currentpwd; var newpwd = document.forms[0].newpwd; var verifypwd = document.forms[0].confirmpwd; var result = true; if (currentpwd.value == ""){ result = false; alert("You forgot to enter your current password.\nPlease do so before submitting this form."); currentpwd.focus(); } else if (newpwd.value == ""){ result = false; alert("Your new password cannot be blank.\nPlease enter a new password."); newpwd.focus(); } else if (newpwd.value != verifypwd.value) { result = false; alert("Please enter the same password in \'new password\' and \'verify new password\'"); newpwd.value = ""; verifypwd.value = ""; newpwd.focus(); } return result; } function verify_send2colleague(){ var fromname = document.send2colleague.fromName; var fromemail = document.send2colleague.fromEmail; var toemail = document.send2colleague.toEmail; var result = true; if (fromname.value == ""){ result = false; alert("Please enter your name"); fromname.focus(); } else if (!IsEmailValid(fromemail.value)){ result = false; alert("There seems to be a problem with your email address.\Please revise it and try again."); fromemail.focus(); } else if (!IsEmailValid(toemail.value)){ result = false; alert("There seems to be a problem with your colleagues email address.\Please revise it and try again."); fromemail.focus(); } return result; } function verifyarticle() { var result = true; var publishday = document.articledetail.thisday; var publishmonth = document.articledetail.thismonth; var publishyear= document.articledetail.thisyear; var availableday = document.articledetail.thisday1; var availablemonth = document.articledetail.thismonth1; var availableyear= document.articledetail.thisyear1; if(publishday.value=="" || publishmonth.value=="" || publishyear.value==""){ result =false; alert("Publishdate cannot be blank.\nPlease revise publishdate"); publishday.focus(); } else if (publishday.value=="" || publishday.value > 31 || publishday.value < 1){ result = false; alert("Review publish date.\nDay seems incorrect."); publishday.focus(); } else if (publishmonth.value=="" || publishmonth.value > 12 || publishmonth.value < 1){ result = false; alert("Review publish date.\nMonth seems incorrect."); publishmonth.focus(); } else if (publishyear.value=="" || publishyear.value < 1966){ result = false; alert("Review publish date.\nYear seems incorrect."); publishyear.focus(); } // copyValue(); return result; } function verifyMailing(){ var result = true; var mailsubject = document.mailingdetails.mailingsubject; if (mailsubject.value ==""){ result = false; alert("Please enter a subject for your mailing"); mailsubject.focus(); } /**/ /* if (confirm("Have you saved the mailing?\n\nYou should save the mailing before continuing.\nClick 'cancel' if you did not save it.")){ result = false; } */ copyValue(); return result; } function checkMembership(){ var IDPriceRadio = document.membership.IDPrice; var result = true; if (checkRadio(IDPriceRadio)==false){ alert("You did not yet select one of the options.\nPlease select your payment option and try again."); result = false; } return result; } // ** END VERIFY FORM FUNCTIONS function dateValid(inputdate){ var monthString = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" var monthArray = monthString.split(","); var checkdate = inputdate; var result = true; if (checkdate != ""){ var daylimit = checkdate.indexOf("/"); var monthlimit = checkdate.lastIndexOf("/"); // alert("checkdate=" + checkdate); var day = parseInt(checkdate.substring(0,daylimit)); var month = parseInt(checkdate.substring(daylimit+1,monthlimit)); var year = checkdate.slice(monthlimit+1); if (year.length < 4){ //making year a full 4 digit number for(counter=1;year.length<3;counter++){ year = "0" + year; } year = "2" + year; } // alert("month=" + month + " Day:" + day + " Year:" + year); // alert("textmonth=" + monthArray[month-1]); // creating valid date based on entered values var enteredDate = new Date(day + " " + monthArray[month-1] + " " +year); // alert ("entereddate=" + enteredDate); // checking date validity based on day of input day and existing day for this date // alert("day: " + enteredDate.getDate()); if (enteredDate.getDate() != day){ result = false; } } return result; } function numberToString(inputNumber,base) { var prefix = ''; if (!base) base = 10; if (base=8) prefix = '0'; if (base=16) prefix = '0x' return (prefix + inputNumber.toString(base)); } function numberToString(inputNumber,base) { var prefix = ''; if (!base) base = 10; if (base=8) prefix = '0'; if (base=16) prefix = '0x' return (prefix + inputNumber.toString(base)); } // ** VERIFY EMAIL FUNCTION function IsEmailValid(checkThisEmail) { var myEMailIsValid = true; var myAtSymbolAt = checkThisEmail.indexOf('@'); var myLastDotAt = checkThisEmail.lastIndexOf('.'); var mySpaceAt = checkThisEmail.indexOf(' '); var myLength = checkThisEmail.length; // at least one @ must be present and not before position 2 // @yellow.com : NOT valid // x@yellow.com : VALID if (myAtSymbolAt < 1 ) {myEMailIsValid = false} // at least one . (dot) afer the @ is required // x@yellow : NOT valid // x.y@yellow : NOT valid // x@yellow.org : VALID if (myLastDotAt < myAtSymbolAt) {myEMailIsValid = false} // at least two characters [com, uk, fr, ...] must occur after the last . (dot) // x.y@yellow. : NOT valid // x.y@yellow.a : NOT valid // x.y@yellow.ca : VALID if (myLength - myLastDotAt <= 2) {myEMailIsValid = false} // no empty space " " is permitted (one may trim the email) // x.y@yell ow.com : NOT valid if (mySpaceAt != -1) {myEMailIsValid = false} // if (!myEMailIsValid == true) // {alert("email is VALID")} // else // {alert("Please check your e-mail address.")} return myEMailIsValid } // ** END VERIFY EMAIL FUNCTION // Change Region Function function changeCountry(){ var country = document.all.regionList.value; document.location.href="http://localhost/BWH/cardiotrends_org/web/" + country; } // END change Region Function