var popWidth=700; var popHeight=300; function confirmDelete(href) { if(confirm("Are you sure you want to delete?")) { window.location=href; return true; } } function confirmDeleteLang(href, msg) { if(msg=='') var msg = "Are you sure you want to delete?"; if(confirm(msg)) { window.location=href; return true; } } function confirmed(href) { if(confirm("Are you sure?")) { window.location=href; return true; } } function confirmedLang(href, msg) { if(msg=='') var msg = "Are you sure?"; if(confirm(msg)) { window.location=href; return true; } } /* this function is not likely to be used so it is commented. please use openPopWin function openNewWin(url,winName,features ) { window.open(url,winName,features); } */ function closeWin() { window.close(); } function autoCloseWin(message) { alert (message); setTimeout("closeWin()",5000); } function reloadParentWin() { window.opener.location.reload(); } var win = null; function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w-20) : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' win = window.open(mypage,myname,settings) } function openPopWin(url,winName, winHeight) { if(winHeight>0) popHeight=winHeight; NewWindow(url,winName, popWidth , popHeight , 'yes'); } function openPopUp(url, winName, w, h) { if(h>0) popHeight = h; if(w>0) popWidth = w; var posX = (screen.width) ? (screen.width-w)/2 : 0; var posY = (screen.height) ? (screen.height-h)/2 : 0; var settings = 'height='+h+',width='+w+',top='+posY+',left='+posX+',scrollbars=yes,resizable'; win = window.open(url, winName, settings) } function openCustomPopup(url, winName, winWidth, winHeight, posLeft, posTop) { if(winHeight>0) popHeight = winHeight; if(winWidth>0) popWidth = winWidth; var settings = "height=" + popHeight +",width=" + winWidth + ",top=" + posTop + ",left=" + posLeft + ",scrollbars=yes,resizable"; window.open(url, winName, settings); } function openEditor(code,siteCode) { return false; var url; url ="url?code=" + code + "&siteCode="+ siteCode; openPopWin(url,'Editor', popHeight); } function test(str) { alert(str); } function unSubscribe(href) { if(confirm("Are you sure you want to unsubscribe?")) { window.location=href; return true; } } function openHelpWin(url) { NewWindow(url,'Help', 400 , 200 , 'yes'); window.active="Help"; } function gotoUrl(url) { window.location.href = url; } function showHideDiv(divID) { if(document.getElementById(divID).style.display=='none') document.getElementById(divID).style.display='block'; else document.getElementById(divID).style.display='none'; }