var udvContLst=null;var pdfStatus="N";function toggleMediaDisp(A){if(document.getElementById(A).style.display=="block"){document.getElementById(A).style.display="none"}else{if(document.getElementById(A).style.display=="none"){document.getElementById(A).style.display="block"}}}function dispOrigImg(imgSrc,imgCaptn,imgPrintCapt,figNumber,imgLegendSeq,imgPrintLeg,imgCopyrght,origWidth,origHeight,imgCopyrghtUrl){var imgLegend="";if(document.getElementById("imgLeg_"+imgLegendSeq)){imgLegend=document.getElementById("imgLeg_"+imgLegendSeq).value}else{imgLegend=imgLegendSeq}if(imgSrc.indexOf(cleanUrlContextPath+"/content/")>-1){document.getElementById("fullSizeImagePath").value=imgSrc}else{if(imgSrc.indexOf("content/")>-1){document.getElementById("fullSizeImagePath").value=baseURL+imgSrc}else{document.getElementById("fullSizeImagePath").value=baseURL+"content/"+imgSrc}}if(figNumber!=""&&figNumber!=null&&imgCaptn!=""&&imgCaptn!=null&&(imgPrintCapt=="Y"||imgPrintCapt=="true")){if(figNumber!=""){document.getElementById("imageCaptionId").value=figNumber+" : "+imgCaptn}else{document.getElementById("imageCaptionId").value=imgCaptn}}else{if(figNumber!=""&&figNumber!=null){document.getElementById("imageCaptionId").value=figNumber}else{if(imgCaptn!=""&&imgCaptn!=null){document.getElementById("imageCaptionId").value=imgCaptn}}}if(imgLegend!=""&&imgLegend!=null&&(imgPrintLeg=="Y"||imgPrintLeg=="true")){document.getElementById("imageLegendId").value=imgLegend}else{document.getElementById("imageLegendId").value=""}if(imgCopyrght!=""&&imgCopyrght!=null){document.getElementById("imageCopyRightId").value=imgCopyrght}else{document.getElementById("imageCopyRightId").value=""}if(imgCopyrghtUrl!=""&&imgCopyrghtUrl!=null){document.getElementById("imageCopyRightUrlId").value=imgCopyrghtUrl}else{document.getElementById("imageCopyRightUrlId").value=""}document.getElementById("selectImgWidth").value=origWidth;document.getElementById("selectImgHeight").value=origHeight;var nowForNewWindow=new Date();nowForNewWindow=nowForNewWindow.getTime();var fileExtn=imgSrc.substring(imgSrc.lastIndexOf(".")+1,imgSrc.length);if(fileExtn=="pdf"||fileExtn=="PDF"){if(cleanUrlContextPath!=null&&cleanUrlContextPath!=""){window.open(cleanUrlContextPath+"/resource?action=showFullImageForTopic&imgSrc="+imgSrc+"&isPDF=yes","newwindow"+nowForNewWindow)}else{window.open(baseURL+"resource?action=showFullImageForTopic&imgSrc="+imgSrc+"&isPDF=yes","newwindow"+nowForNewWindow)}}else{if(cleanUrlContextPath!=null&&cleanUrlContextPath!=""){window.open(cleanUrlContextPath+"/resource?action=showFullImageForTopic&imgSrc="+imgSrc+"","newwindow"+nowForNewWindow,"height="+eval(parseInt(origHeight)+100)+",width="+eval(parseInt(origWidth)+50)+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, directories=no, status=no, dependent=yes")}else{window.open(baseURL+"resource?action=showFullImageForTopic&imgSrc="+imgSrc,"newwindow"+nowForNewWindow,"height="+eval(parseInt(origHeight)+100)+",width="+eval(parseInt(origWidth)+50)+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, directories=no, status=no")}}}function dispUdvMsg(){document.getElementById("showUdvMsg").style.display="block";document.getElementById("fadeUdvMsg").style.display="block"}function hideOrigImg(){document.getElementById("showOriginalImg").style.display="none";document.getElementById("fadeOriginalImg").style.display="none"}function hideUdvMsg(){document.getElementById("showUdvMsg").style.display="none";document.getElementById("fadeUdvMsg").style.display="none"}function resetThumbNailSize(D,A){var B=document.styleSheets;var E=false;var J=0;var K=B.length;var C=6;var F=0;for(var H=0;H<K;H++){if(B[H].rules){ruleList=B[H].rules}else{ruleList=B[H].cssRules}ruleSize=ruleList.length;for(var G=0;G<ruleSize;G++){if(ruleList[G].selectorText&&ruleList[G].selectorText.indexOf(".thumbToOrigimgLB")>-1){widthThumb1=escape(trim(A.substring(0,A.indexOf("px"))));J=parseInt(widthThumb1)+"px"}if(ruleList[G].selectorText&&ruleList[G].selectorText.indexOf(".thumnailLBContent")>-1){J=escape(trim(J.substring(0,J.indexOf("px"))));var I=parseInt(J)+parseInt(C);ruleList[G].style.width=I+"px";E=true;break}}if(E){break}}}function getLinkedUDVList(){var url=baseURL+"resource?action=getUDVContentList&TOPIC_PAGE_DOCUMENT_ID="+contentId+"&ajaxFlag=true";AjaxUtil.request(url,{onComplete:function(xmlHttpReq){var msg=xmlHttpReq.responseText;var jArr=null;udvContLst=new Array();if(msg!=null&&msg!=""){jArr=eval("("+msg+")");for(var i=0;i<jArr.length;i++){udvContLst[i]=jArr[i]}}}})}function refreshLocalUDVList(udvLst){var jArr=null;var additions=null;var found=false;var addCtr=0;if(udvContLst==null){udvContLst=new Array()}additions=new Array();if(udvLst!=null&&udvLst!=""){jArr=eval("("+udvLst+")");for(var i=0;i<jArr.length;i++){for(var j=0;j<udvContLst.length;j++){if(udvContLst[j]==jArr[i]){found=true;break}}if(!found){additions[addCtr]=jArr[i];addCtr++}found=false}var udvLstPrevLen=udvContLst.length;for(var k=0;k<additions.length;k++){udvContLst[udvLstPrevLen+k]=additions[k]}}}function isUDV(A){if(pageName=="topicPage"||pageName=="topicRoom"||pageName=="authorCnt"||pageName=="authorQues"||pageName=="quesView"){for(i=0;i<udvContLst.length;i++){if(udvContLst[i]==A){dispUdvMsg();return false}}if(A.indexOf("content/")>-1){if(!checkTopicContentViewStatus(A)){show_inform("Content",exceededAllowedRegisteredMsg);return false}}return true}else{return true}}function checkTopicContentViewStatus(D){var B=D.split("-");var C=B[B.length-1];var A=new Date();url="action=checkContentViewStatus&ajaxFlag=true&pdfNewWin=Y&contentID="+C+"&count="+A.getUTCDate()+A.getHours()+A.getMinutes()+A.getSeconds()+A.getUTCMilliseconds();try{$.ajax({type:"GET",url:baseURL+"resource",data:url,async:false,success:function(F){pdfStatus=F}})}catch(E){return false}if(pdfStatus!="Y"){return false}else{return true}}function addOnClickReferencesLinks(){var A="";try{if(document.getElementById("sourcesDisp")){A=document.getElementById("sourcesDisp").getElementsByTagName("a");for(var C=0;C<A.length;C++){try{if(A[C].href&&A[C].href.indexOf("javascript:")==-1&&A[C].href.indexOf("#")==-1&&((A[C].href.indexOf("content/")>-1&&A[C].href.indexOf(cleanBaseURL)>-1)||($(A[C]).attr("mce_href")&&($(A[C]).attr("mce_href").indexOf("content/")==0||$(A[C]).attr("mce_href").indexOf("/content/")==0)))){A[C].onclick=function(E){return isUDV(this.href)}}if(A[C].href&&A[C].href.indexOf("javascript:")==-1&&A[C].href.indexOf("#")==-1&&(!((A[C].href.indexOf("topicpage/")>-1&&A[C].href.indexOf(cleanBaseURL)>-1)||($(A[C]).attr("mce_href")&&($(A[C]).attr("mce_href").indexOf("topicpage/")==0||$(A[C]).attr("mce_href").indexOf("/topicpage/")==0))))){A[C].target="_blank"}if(A[C].href&&A[C].href.indexOf("javascript:")==-1&&A[C].href.indexOf("#")==-1&&(!((A[C].href.indexOf("definition/")>-1&&A[C].href.indexOf(cleanBaseURL)>-1)||($(A[C]).attr("mce_href")&&($(A[C]).attr("mce_href").indexOf("definition/")==0||$(A[C]).attr("mce_href").indexOf("/definition/")==0))))){A[C].target="_blank"}if(A[C].href&&A[C].href.indexOf("javascript:")==-1&&A[C].href.indexOf("#")==-1&&(!((A[C].href.indexOf("show-assessment/")>-1&&A[C].href.indexOf(cleanBaseURL)>-1)||($(A[C]).attr("mce_href")&&($(A[C]).attr("mce_href").indexOf("show-assessment/")==0||$(A[C]).attr("mce_href").indexOf("/show-assessment/")==0))))){A[C].target="_blank"}if(A[C].href&&A[C].href.indexOf("javascript:")==-1&&A[C].href.indexOf("#")==-1&&(!((A[C].href.indexOf("learning-path/")>-1&&A[C].href.indexOf(cleanBaseURL)>-1)||($(A[C]).attr("mce_href")&&($(A[C]).attr("mce_href").indexOf("learning-path/")==0||$(A[C]).attr("mce_href").indexOf("/learning-path/")==0))))){A[C].target="_blank"}}catch(D){}}}}catch(B){}}function addHrefReferencesLinks(A){var B="";if(document.getElementById(A)){B=document.getElementById(A).getElementsByTagName("a");for(var E=0;E<B.length;E++){try{if(B[E].href&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&((B[E].href.indexOf("content/")>-1&&B[E].href.indexOf(cleanBaseURL)>-1)||($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&($(B[E]).attr("mce_href").indexOf("content/")==0||$(B[E]).attr("mce_href").indexOf("/content/")==0)))&&B[E].href.indexOf("natedPdfNewWin-")==-1&&B[E].innerHTML!="Full Screen"){var D=B[E].href.split("/");var C=D[D.length-1];if($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href").replace(C,"natedPdfNewWin-"+C)}else{B[E].href=B[E].href.replace(C,"natedPdfNewWin-"+C)}}if(B[E].href&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&(!((B[E].href.indexOf("topicpage/")>-1&&B[E].href.indexOf(cleanBaseURL)>-1)||($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&($(B[E]).attr("mce_href").indexOf("topicpage/")==0||$(B[E]).attr("mce_href").indexOf("/topicpage/")==0))))&&B[E].innerHTML!="Full Screen"){B[E].target="_blank"}if(B[E].href&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&(!((B[E].href.indexOf("learning-path/")>-1&&B[E].href.indexOf(cleanBaseURL)>-1)||($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&($(B[E]).attr("mce_href").indexOf("learning-path/")==0||$(B[E]).attr("mce_href").indexOf("/learning-path/")==0))))&&B[E].innerHTML!="Full Screen"){B[E].target="_blank"}if(B[E].href&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&(!((B[E].href.indexOf("show-assessment/")>-1&&B[E].href.indexOf(cleanBaseURL)>-1)||($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&($(B[E]).attr("mce_href").indexOf("show-assessment/")==0||$(B[E]).attr("mce_href").indexOf("/show-assessment/")==0))))&&B[E].innerHTML!="Full Screen"){B[E].target="_blank"}if(B[E].href&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&(!((B[E].href.indexOf("definition/")>-1&&B[E].href.indexOf(cleanBaseURL)>-1)||($(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&($(B[E]).attr("mce_href").indexOf("definition/")==0||$(B[E]).attr("mce_href").indexOf("/definition/")==0))))&&B[E].innerHTML!="Full Screen"){B[E].target="_blank"}if(B[E].href&&$(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&B[E].href.indexOf(cleanBaseURL)==-1&&$(B[E]).attr("mce_href").indexOf("/content/")==0){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href")}if(B[E].href&&$(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&B[E].href.indexOf(cleanBaseURL)==-1&&$(B[E]).attr("mce_href").indexOf("/definition/")==0){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href")}if(B[E].href&&$(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&B[E].href.indexOf(cleanBaseURL)==-1&&$(B[E]).attr("mce_href").indexOf("/topicpage/")==0){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href")}if(B[E].href&&$(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&B[E].href.indexOf(cleanBaseURL)==-1&&$(B[E]).attr("mce_href").indexOf("/learning-path/")==0){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href")}if(B[E].href&&$(B[E]).attr("mce_href")&&$(B[E]).attr("mce_href")!=null&&B[E].href.indexOf("javascript:")==-1&&B[E].href.indexOf("#")==-1&&B[E].href.indexOf(cleanBaseURL)==-1&&$(B[E]).attr("mce_href").indexOf("/show-assessment/")==0){B[E].href=cleanBaseURL+$(B[E]).attr("mce_href")}}catch(F){}}imgList=document.getElementById(A).getElementsByTagName("img");for(var E=0;E<imgList.length;E++){try{if($(imgList[E]).attr("mce_src")&&$(imgList[E]).attr("mce_src").indexOf("content/")==0){imgList[E].src=cleanBaseURL+"/"+$(imgList[E]).attr("mce_src")}}catch(F){}}}}function refreshVideos(){try{var C=document.getElementsByName("hidEmbedImg");for(var B=0;B<C.length;B++){if(C[B].value!=""&&document.getElementById($(C[B]).attr("id").replace("hidEmbedImg_","hidEmbedPlayerState_")).value=="uninitedvideo"){createVideoObject(C[B].value,$(C[B]).attr("id").replace("hidEmbedImg_","videoPlayer_"),"videoPlayer",$(C[B]).attr("id").replace("hidEmbedImg_","spanVideoPlayer_"));document.getElementById($(C[B]).attr("id").replace("hidEmbedImg_","hidEmbedPlayerState_")).value="initedvideo"}}}catch(A){}}function createVideoObject(D,A,F,E){var B=D;try{var H=new Date();postFrmNow=H.getTime();B=D.replace(".flv",".jpg")+"?"+postFrmNow;var G=$("#"+A).attr("flashvars")+"&image="+B;$("#"+A).attr("flashvars",G)}catch(C){}var I=new SWFObject("/scitable/nated/media/player.swf",A,"320","200","9.0.124");I.addParam("allowscriptaccess","always");I.addParam("allowfullscreen","true");I.addParam("pluginspage","http://www.macromedia.com/go/getflashplayer");I.addVariable("file",D);if(D!=""&&D!=null&&D.indexOf(".flv")>-1){I.addVariable("image",B);I.addParam("image",B)}I.addVariable("fullscreen","true");I.addVariable("autostart","false");I.addVariable("backcolor","#ffffff");I.addVariable("stretching","exactfit");I.write(E)}function createAudioObject(B,D,E,A){var C=new SWFObject("/scitable/nated/media/player.swf",D,"320","20","9.0.124");C.addParam("allowscriptaccess","always");C.addParam("allowfullscreen","true");C.addParam("pluginspage","http://www.macromedia.com/go/getflashplayer");C.addVariable("file",B);C.addVariable("fullscreen","true");C.addVariable("autostart","false");C.addVariable("backcolor","#ffffff");C.addVariable("stretching","exactfit");C.write(A)}function clearBlogCache(){var A=baseURL+"upload?action=updateBlogData&handleID="+weblogId+"&ajaxFlag=true";AjaxUtil.request(A,{onComplete:function(B){var C=B.responseText}})};