/* core javascript file for NKO IOC */ /* contains general utility functions and objects */ /* [PON] */ 
	
function popWin(URL){ window.open(URL, 'poppedWindow','top=50,left=200, width=500,height=400,screenX=200,screenY=50,toolbar=yes,menubar=yes,status=true,location=true,resizable=yes,scrollbars=yes'); } 

function openBookmarkURL(URL){ if(URL != "null"){ if(URL == "/portal/UserBookMarks/DisplayBookMarks.jsp"){ showBM(URL); }else{ window.location = URL; } } } function showBM(URL){ winW = (window.innerWidth)? window.innerWidth:window.document.body.clienWiidth; winH = (window.innerHeight) ? window.innerHeight:window.document.body.clientHeight; adjW = Math.round((winW/2)-200); adjH = Math.round((winH/2)-170); existParamStr = "scrollbars=yes,status=yes,width=430,height=330,top=" + adjH + ",left=" + adjW; bookmarkWin = window.open(URL,"bookmarkWin",existParamStr); } 

function showMsg(URL){ winW = (window.innerWidth)? window.innerWidth:window.document.body.clienWiidth; winH = (window.innerHeight) ? window.innerHeight:window.document.body.clientHeight; adjW = Math.round((winW/2)-200); adjH = Math.round((winH/2)-170); existParamStr = "scrollbars=yes,status=yes,width=430,height=330,top=" + adjH + ",left=" + adjW; bookmarkWin = window.open(URL,"alertWin",existParamStr); } 

function showNewDocHelp(URL){ winW = (window.innerWidth)? window.innerWidth:window.document.body.clienWiidth; winH = (window.innerHeight) ? window.innerHeight:window.document.body.clientHeight; adjW = Math.round((winW/2)-200); adjH = Math.round((winH/2)-170); existParamStr = "status=yes,width=430,height=330,top=" + adjH + ",left=" + adjW; bookmarkWin = window.open(URL,"newDocWin",existParamStr); } 

function forwardBM(URL){ window.opener.location = URL; window.close(); } 

function handlePageOption(optionValue,optionText,pageID,communityID){ if (optionText == 'Edit Page'){ EditPage(pageID,communityID); } if (optionText == 'Add Tab'){ AddTab(pageID); } if (optionText == 'Remove Tab'){ RemoveTab(optionValue,pageID); } if (optionText == 'Add Bookmark'){ AddBookmark(pageID); } if (optionText == 'Send Page Link') { SendPageLink(optionValue, pageID); } } 

function EditPage(pageID,communityID){ location.href = '/portal/settings/community_pages.jsp?mode=6&paf_page_id=' + pageID + '&paf_community_id=' + communityID; }

function AddTab(pageID){ location.href = '/portal/UserTabs/AddTab.jsp?page_id=' + pageID; } 

function RemoveTab(optionValue,pageID){ location.href = '/portal/UserTabs/RemoveTab.jsp?page_id=' + pageID + '&tabidx=' + optionValue; } 

function AddBookmark(pageID){ location.href = '/portal/UserBookMarks/AddBookMark.jsp?page_id=' + pageID; } 

function SendPageLink(optionValue, pageID) { window.open('/portal/sendPortalLink/sendPageLink.jsp?pageId=' + pageID + '&title=' + optionValue, 'pageLink','top=50,left=200,width=610,height=490,screenX=200,screenY=50,toolbar=no,menubar=no,status=false,location=true,resizable=yes,scrollbars=no'); } 

minImg = new Image(); minImg.src = "gear_min.gif"; maxImg = new Image(); maxImg.src = "gear_max.gif"; 

function exColGear(gearID){ divID = "Gear_" + gearID; imgID = "Img_" + gearID; currentGear = document.getElementById(divID); currentImg = document.getElementById(imgID); currentState = (currentGear.style.display == "none") ? "block" : "none"; currentImg.src = (currentState == "block") ? minImg.src : maxImg.src; currentGear.style.display = (currentGear.style.display == "none") ? "block" : "none"; } 

function ACGetDocument(id, inline){ if(!inline){ inline = 'false'; } else if(inline == 'inline'){ inline = 'true'; } parent.location.href = "/portal/download?lib_documentId=" + id; } 

function sortNumeric(a,b){ return a-b; } 