//...............................................PrintPage............................ function PrintPage() { window.print() } //......................................end............................................... //...............................................OpenNewWin............................ function openNewWin(urlstr) { window.open(urlstr, "coursewin",'toolbar=no,location=no,scrollbars=yes,menubar=no,titlebar=no,resizable=yes,width=1150,height=850'); } //......................................end............................................... //...............................................TopicInfo............................ function TopicInfo(Topic) { Show=Topic; CTI= open(Show, 'CodeTopicInformation', 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes,width=550,height=350'); CTI.focus(); } //......................................end............................................... //......................................CheckRadios............................................... var msgflag; //leave variable outside of function so that it can be referenced above function checkRadios(form) { var el = form.elements; msgflag ="false"; for(var i = 0 ; i < el.length ; ++i) { if((el[i].type == "radio") || (el[i].type == "checkbox")) { var radiogroup = el[el[i].name]; // get the whole set of radio buttons. var itemchecked = false; for(var j = 0 ; j < radiogroup.length ; ++j) { if(radiogroup[j].checked) { itemchecked = true; break; } } if(!itemchecked) { //alert("Please choose an answer for "+el[i].name+"."); string = new String(el[i].name); //extract question number from field name alert("Please choose an answer for question #"+string.slice(1,-2)); msgflag="true"; if(el[i].focus) el[i].focus(); return false; } } } return true; } //......................................end............................................... /* Removed 11/2/12 - causing problems with text fields in Firefox (users are not able to click into the fields). //disable right click menu document.oncontextmenu = function() { return false } if(document.layers) { window.captureEvents(Event.MOUSEDOWN); window.onmousedown = function(e) { if(e.target==document) return false; } } else { document.onmousedown = function() {return false } } */ // return the value of the radio button that is checked // return an empty string if none are checked, or // there are no radio buttons function getCheckedValue(radioObj) { if(!radioObj) return ""; var radioLength = radioObj.length; if(radioLength == undefined) if(radioObj.checked) return radioObj.value; else return ""; for(var i = 0; i < radioLength; i++) { if(radioObj[i].checked) { return radioObj[i].value; } } return ""; } function entsub2(event) { var isNav4=false; var isIE4=false; // find browser type and version if (navigator.appVersion.indexOf("4.")>=0) { if(navigator.appName=="Netscape") { isNav4=true; } if(navigator.userAgent.indexOf("MSIE")>0) { isIE4=true; } } // use the appropriate event property for the detected browser if (isNav4) { if ( event.which == "13" ) { // window.location=getSearchView(); // window.location="http://www.realtor.org" document._THISNARFORM.action=document.forms[0].action; document._THISNARFORM.submit() event.returnValue = false; } } else { if ( event.keyCode=="13" ) { // window.location=getSearchView(); // window.location="http://www.realtor.org" document._THISNARFORM.action=document.forms[0].action; document._THISNARFORM.submit() event.returnValue = false; } } }