var sPageURL='/PM.qst?action=goPage&docId='; function pageTxt_href_onClick(atemp,isImageViewable,isBarrier) { if (isBarrier=="true"){ alert("This feature allows you to open images in a new window.\n\nQuestia's time-saving tools will save you hours of work when you become a subscriber.\n\nTo use this feature you must be a subscriber to Questia service. To view your\nsubscription options click on the subscribe button"); return false; } if (atemp.indexOf('/') > 0) { atemp2=atemp.split('/'); alink=atemp2[2]; } else { alink=atemp; } if (alink.indexOf('.fpx') < 0) // Standard files { if (alink.indexOf('#') < 0) { if (isDigit(alink.charAt(0))) { window.location=sPageURL+alink; } else if (alink.charAt(0)=='i') { window.location=sPageURL+alink.substring(1,alink.length); } else { if(atemp.indexOf('http')<0) atemp = 'http://'+atemp; window.open(atemp,'external','',true); } return false; } else { return true; } } else // serve the fpx image { var i = alink.indexOf(".fpx"); var temp = alink.substring(1, i); if (i < 3) { return false; } var c = temp.charAt(0); if (!isLetter(c)) { return false; } for (i = 1; i < temp.length; i++) { c = temp.charAt(i); if (!isDigit(c)) { break; } } alink = alink.substring(1, i+1) + "/" + alink.substring(1,alink.length); var urlStr = "/ImageViewer.qst?action=1&docId=" + questia.Dictionary.scholar.rootId + "&imageName=" + alink + "&pageNo=" + questia.Dictionary.scholar.pageNumber + "&isImageViewable=" + isImageViewable; var xpos=(screen.availWidth-670)/2; var ypos=(screen.availHeight-510)/2; xwin=window.open(urlStr,'imageinfo','left='+xpos+',top='+ypos+',width=750,height=550,resizable,scrollbars',false); } return false; } function isDigit(c) { switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return true; break; default: return false; break; } } function isLetter(c) { c=c.toLowerCase(); switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return true; break; default: return false; break; } }