JS_SEARCH_MISSING_ERROR = "Please enter your search criteria."; JS_SEARCH_FORMAT_ERROR = "Please enter valid search criteria."; JS_YOUR_NAME_MISSING_ERROR = "Please enter your name."; JS_FRIEND_NAME_MISSING_ERROR = "Please enter your friends name."; JS_YOUR_EMAIL_MISSING_ERROR = "Please enter your email address."; JS_FRIEND_EMAIL_MISSING_ERROR = "Please enter your friend's email address."; JS_YOUR_NAME_FORMAT_ERROR = "Please use only letters and/or numerals."; JS_FRIEND_NAME_FORMAT_ERROR = "Please use only letters and/or numerals."; JS_EMAILADDRESS_MISSING_ERROR = "Please use only letters and/or numerals."; JS_EMAILADDRESS_FORMAT_ERROR = "Please enter a valid e-mail address."; JS_COMMENTS_MESSAGE_TOO_LONG = "Please enter maximum of 500 characters."; //=========================================================== // This function is required for IE only, as it doesn't support // the :hover pseudo class on elements other then //============================================================ function InitializeMenu() { if (document.all && document.getElementById) { var navRoot = document.getElementById("Nav"); for (i=0; i of the document being sent var strPageTitle = escape( parent.document.title ); var strURLParams = '?ForceUserDeserialize=-1&pageToSend=' + strCurrentUrl + '&pageTitle=' + strPageTitle + '&mode=submitted'; var strURL = objLink.href + strURLParams; var strWindowProperties = 'width=459,height=460,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; // open the window openWindow(strURL ,'send_to_a_friend', strWindowProperties); // prevent any further code from executing return false; } //================================================= // Open an new window with customized properties //================================================= function openWindow(URL, Name, Args){ popupWin = window.open(URL, Name, Args); popupWin.focus(); } function isEmailChars(str){ var theText = /^[\@\.a-z0-9_-]+$/gi; var result = str.match(theText); if(result != null)return true; else return false; } function isValidEmail(strEmail) { return (strEmail.indexOf(".") > 2) && (strEmail.indexOf("@") > 0); } function isAlphaNumeric(str) { var numeric = str; for(var j=0; j 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || (hh == 32)) { } else { return false; } } return true; } function trackEvent(type){ if (document.getElementById) document.getElementById('trackingFrame').src = 'tracking.asp?type=' + type; } function isMessageCommentLengthOK(strComment,len){ if ((trim(strComment)).length>len)return false; return true; } function printPage(){ if (window.print) window.print(); else alert('Your browser does not support javascript printing.\nTo print this page, select File: Print from your menu.\nThis page is already printer friendly.'); } //================================================= // Open an new window with for popupimage //================================================= function popupwindowscroll(url, intWidth,intHeight,blnScroll){ if (intWidth == null || intHeight == null) {intWidth=750;intHeight=535;} if (blnScroll == null) {blnScroll='yes';} // this is the common window for popups. it resizes to the size needed //NewWindow = window.open(url,"POPUPWINDOWSCROLL","toolbar=no,width="+intWidth+",height="+intHeight+",directories=no,status=no,scrollbars=yes,resizable=no,menubar=no,top=0,left=20"); window.name ="NewWindow"; NewWindow = window.open(url,"POPUPWINDOWSCROLL","toolbar=no,width="+intWidth+",height="+intHeight+",directories=no,status=no,scrollbars="+blnScroll+",resizable=no,menubar=no,top=0,left=20"); NewWindow.resizeTo(intWidth, intHeight); NewWindow.focus(); } //================================================= // show leaving the site warning //================================================= var ExitPopUpsEnabled = true; var SiteExceptions = new Array ("www.organon.com","hcp.organon.com","www.organon-conferences.com","www.psychiatrymatters.md","www.remeronsoltab.md","www.nuvaring.md","www.orgyn.com","www.implanon.md","www.cerazette.md","www.contraception.net","www.nuvaring.com","www.mycontraceptive.com","www.cyclessa.com","www.marvelon.ca","www.puregonpen.com","www.puregon.md","www.puregon.com","www.follistim.com","www.fertilityjourney.com","www.livial.md","www.liviella.de","hcp.livial.info","www.livial.com","www.andriol.md","www.andriol.com","www.andropause.com","www.anesthesianow.com","www.esmeron.md","www.zemuron.com","www.oncotice.md", "www.kinderwens.nl", "www.fertilityjourney.com.sg", "www.unserwunschkind.at", "www.kinderwunsch.de", "www.jeveux1bebe.be", "www.viajandohacialafertilidad.com","www.organon.nl", "www.kinderwens.be", "www.fertilityjourney.com.my", "www.fertilitetsguiden.nu","www.schildklierzorg.nl","http://www.puregon.com","www.andropause.ca","www.schering-plough.ca"); function ReplaceLinks() { var currentdomain = document.domain; if (ExitPopUpsEnabled) { for (l=0; l 0) { if (this[i-1].toUpperCase() === search_term) return true; } } while (--i); return false; } function trim(inputString) { // Removes leading and trailing spaces from the passed string. Also removes consetrimive spaces and replaces it with one space. var returnValues = inputString; var ch = returnValues.substring(0, 1); while (ch == " ") { // Check for spaces at the beginning of the string returnValues = returnValues.substring(1, returnValues.length); ch = returnValues.substring(0, 1); } ch = returnValues.substring(returnValues.length-1, returnValues.length); while (ch == " ") { // Check for spaces at the end of the string returnValues = returnValues.substring(0, returnValues.length-1); ch = returnValues.substring(returnValues.length-1, returnValues.length); } while (returnValues.indexOf(" ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string returnValues = returnValues.substring(0, returnValues.indexOf(" ")) + returnValues.substring(returnValues.indexOf(" ")+1, returnValues.length); // Again, there are two spaces in each of the strings } return returnValues; } function validateForm(theForm){ if(theForm.textFriendName){ if(trim(theForm.textFriendName.value) == ""){ alert(JS_FRIEND_NAME_MISSING_ERROR); theForm.textFriendName.focus(); return false; } else{ if(!isAlphaNumeric(trim(theForm.textFriendName.value))){ alert(JS_YOUR_NAME_FORMAT_ERROR); theForm.textFriendName.focus(); return false; } theForm.textFriendName.value = trim(theForm.textFriendName.value); } } if(theForm.textFriendEmail){ if(trim(theForm.textFriendEmail.value) == ""){ alert(JS_FRIEND_EMAIL_MISSING_ERROR); theForm.textFriendEmail.focus(); return false; }else{ if(!isValidEmail(trim(theForm.textFriendEmail.value))){ alert(JS_EMAILADDRESS_FORMAT_ERROR); theForm.textFriendEmail.focus(); return false; } theForm.textFriendEmail.value = trim(theForm.textFriendEmail.value); } } if(theForm.textYourName){ if(trim(theForm.textYourName.value) == ""){ alert(JS_YOUR_NAME_MISSING_ERROR); theForm.textYourName.focus(); return false; } else{ if(!isAlphaNumeric(trim(theForm.textYourName.value))){ alert(JS_YOUR_NAME_FORMAT_ERROR); theForm.textYourName.focus(); return false; } theForm.textYourName.value = trim(theForm.textYourName.value); } } if(theForm.textYourEmail){ if(trim(theForm.textYourEmail.value) == ""){ alert(JS_YOUR_EMAIL_MISSING_ERROR); theForm.textYourEmail.focus(); return false; }else{ if(!isValidEmail(trim(theForm.textYourEmail.value))){ alert(JS_EMAILADDRESS_FORMAT_ERROR); theForm.textYourEmail.focus(); return false; } theForm.textYourEmail.value = trim(theForm.textYourEmail.value); } } if(theForm.textMessage){ if (!isMessageCommentLengthOK(trim(theForm.textMessage.value),500)){ alert(JS_COMMENTS_MESSAGE_TOO_LONG); theForm.textMessage.focus(); return false; } } return true; }