//document.domain = "v2.myvirtualpaper.com"; function gotoPage(page) { document.getElementById('core').flashGotoPage(page); } function update(myPage) { if (top.top2) {top.top2.hybrid.switchPage(myPage);} if (top.hybrid) {top.hybrid.switchPage(myPage);} if (top.hybrid2) {top.hybrid2.switchPage(myPage);} } if(!window.Node) { var Node = { ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_FRAGMENT_NODE: 11 }; } function registerOnLoadFunction(f) { var currentOnLoad = window.onload; if (typeof window.onload != "function") { window.onload = f; } else { window.onload = function() { currentOnLoad(); f(); } } } function getElementsByClassName(classname, node, tagname){ if(!node) node = document; else if (typeof node == "string") node = document.getElementById(node); if(!tagname) tagname = "*"; var loopNodes = node.getElementsByTagName(tagname); var foundNodes = []; for(var i = 0; i < loopNodes.length; i++) { var currentNodeClassesString = loopNodes[i].className; if(!currentNodeClassesString) continue; if(currentNodeClassesString == classname) { foundNodes.push(loopNodes[i]); continue; } var whiteSpaceRegex = /\s+/; if(!whiteSpaceRegex.test(currentNodeClassesString)) continue; var currentNodeClassesArray = currentNodeClassesString.split(whiteSpaceRegex); for(var i = 0; i < currentNodeClassesArray.length; i++) { if(currentNodeClassesArray[i] == classname) foundNodes.push(loopNodes[i]); } } return foundNodes; } function openFull(p,n) { var r = null; r = window.open(p,n,'width='+screen.width+',height='+screen.height+',top='+0+',left='+0+','+'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no'); if(r!=null && window.focus) r.window.focus(); }; var active; var hidden = false; //opposite of what you want the initial state to be function refreshHeight() { var componentDivNames = document.getElementById("sliderContainer").getElementsByTagName("div"); for(var i = 0; i < componentDivNames.length; i++) { //componentDivNames[i].style.height = document.documentElement.clientHeight - 40 + "px"; componentDivNames[i].style.height = dimensions.getViewportHeight() - 40 + "px"; //alert(componentDivNames[i].id + ": " + componentDivNames[i].style.height); } } function toggleVisible(){ document.getElementById('sliderContainer').style.left="0px"; active.style.left="0px"; document.getElementById('buttons').style.left="300px"; hidden = false; } function toggleHidden(){ document.getElementById('buttons').style.left="0px"; document.getElementById('sliderContainer').style.left="-300px"; hidden = true; } function slide(visibleDiv, forceShow) { if(!active){ active = document.getElementById("sliderContainer").getElementsByTagName("div")[0]; } if(!active) { document.getElementById('buttons').style.left="-300px"; return; } if(visibleDiv == null) visibleDiv = active; else active = document.getElementById(visibleDiv); if(hidden) { toggleVisible(); } else if (!forceShow) { toggleHidden(); } var componentDivNames = document.getElementById("sliderContainer").getElementsByTagName("div"); for(var i = 0; i < componentDivNames.length; i++) { componentDivNames[i].style.left = "-300px"; } active.style.left="0px"; refreshHeight(); } registerOnLoadFunction(function() {slide(); }); window.onresize = function () {refreshHeight();} function openPopup(url, popupWidth, popupHeight, popupAlign, popupVAlign, popupScrollbars, popupResizable) { var r = null; var width, height, scrollbars, resizable, top, left; popupWidth= String(popupWidth); popupHeight= String(popupHeight); width = (popupWidth.substr(popupWidth.length-1, 1) == "%") ? parseInt(popupWidth.substr(0, popupWidth.length - 1)) * screen.width / 100 : parseInt(popupWidth); height = (popupHeight.substr(popupHeight.length-1, 1) == "%") ? parseInt(popupHeight.substr(0, popupHeight.length - 1)) * screen.height / 100 : parseInt(popupHeight); switch(popupAlign) { case "left": left = 0; break; case "center": left = (screen.width - width) / 2 break; case "right": left = screen.width - width; break; default: left = 0; } switch(popupVAlign) { case "top": top = 0; break; case "middle": top = (screen.height - height) / 2 break; case "bottom": top = screen.height - height; break; default: top = 0; } scrollbars = (popupScrollbars == "yes") ? 1 : 0; resizable = (popupResizable == "yes") ? 1 : 0; r = window.open(url, "virtualpaper", "width="+width+",height="+height+",top="+top+",left="+left+","+"scrollbars="+scrollbars+",toolbar=no,location=no,status=no,menubar=no,resizable="+resizable+",dependent=no"); if(r!=null && window.focus) r.window.focus(); } function openPopupDebug(url, popupWidth, popupHeight, popupAlign, popupVAlign, popupScrollbars, popupResizable) { var r = null; var width, height, scrollbars, resizable, top, left; popupWidth= String(popupWidth); popupHeight= String(popupHeight); width = (popupWidth.substr(popupWidth.length-1, 1) == "%") ? parseInt(popupWidth.substr(0, popupWidth.length - 1)) * screen.width / 100 : parseInt(popupWidth); height = (popupHeight.substr(popupHeight.length-1, 1) == "%") ? parseInt(popupHeight.substr(0, popupHeight.length - 1)) * screen.height / 100 : parseInt(popupHeight); switch(popupAlign) { case "left": left = 0; break; case "center": left = (screen.width - width) / 2 break; case "right": left = screen.width - width; break; default: left = 0; } switch(popupVAlign) { case "top": top = 0; break; case "middle": top = (screen.height - height) / 2 break; case "bottom": top = screen.height - height; break; default: top = 0; } scrollbars = (popupScrollbars == "yes") ? 1 : 0; resizable = (popupResizable == "yes") ? 1 : 0; r = window.open(url, "virtualpaper", "width="+width+",height="+height+",top="+top+",left="+left+","+"scrollbars="+scrollbars+",toolbar=no,location=no,status=no,menubar=no,resizable="+resizable+",dependent=no"); if(r!=null && window.focus) r.window.focus(); }