var page;var main;var side;var focus;var menu;var footer;var spc;var spcx;var spcy;var spcw;var spch;var spcbr;var spcbb;var spcbbr;var mousex;var mousey;var fspc;var fspcx;var fspcy;var fspcw;var fspch;var browsername = navigator.appName;var browseragent = navigator.userAgent;onload = mainFunctions;function mainFunctions(){if(page == "home"){loadForm();loadSign();}else if(page == "browse"){browseurl = document.getElementById("hiddenurl").value;loadFriends(browseurl);}main = document.getElementById("main");side = document.getElementById("sidebar");focus = document.getElementById("focus");menu = document.getElementById("menu");footer = document.getElementById("footer");spc = document.getElementById("content");spcx = int(spc.offsetLeft);spcy = int(spc.offsetTop);spcw = int(spc.offsetWidth);spch = int(spc.offsetHeight);spcbr = document.getElementById("contentright");spcbr.style.height = spch + "px";spcbb = document.getElementById("contentbottom");spcbb.style.width = spcw + "px";spcbbr = document.getElementById("contentnw");}function hStretch(e){if(e == null)e = window.event;disableSelection(document.body);mousex = e.clientX;fspc = document.getElementById("contentframe");fspc.style.visibility = "visible"; fspc.style.position = "absolute";fspc.style.border = "3px dotted gray";fspc.style.width = int(spc.offsetWidth);fspc.style.height = int(spc.offsetHeight);fspcx = spc.offsetLeft;fspcy = spc.offsetTop;fspc.style.left = fspcx + "px";fspc.style.top = fspcy + "px";fspc.style.zIndex = 20;document.onmousemove = hStretching;document.onmouseup = dropH;}function vStretch(e){if(e == null)e = window.event;disableSelection(document.body);mousey = e.clientY;fspc = document.getElementById("contentframe");fspc.style.visibility = "visible"; fspc.style.position = "absolute";fspc.style.border = "3px dotted gray";fspc.style.width = int(spc.offsetWidth);fspc.style.height = int(spc.offsetHeight);fspcx = spc.offsetLeft;fspcy = spc.offsetTop;fspc.style.left = fspcx + "px";fspc.style.top = fspcy + "px";fspc.style.zIndex = 20;document.onmousemove = vStretching;document.onmouseup = dropH;}function nwStretch(e){if(e == null)e = window.event;disableSelection(document.body);mousex = e.clientX;mousey = e.clientY;fspc = document.getElementById("contentframe");fspc.style.visibility = "visible"; fspc.style.position = "absolute";fspc.style.border = "3px dotted gray";fspc.style.width = int(spc.offsetWidth);fspc.style.height = int(spc.offsetHeight);fspcx = spc.offsetLeft;fspcy = spc.offsetTop;fspc.style.left = fspcx + "px";fspc.style.top = fspcy + "px";fspc.style.zIndex = 20;document.onmousemove = nwStretching;document.onmouseup = dropH;}function hStretching(e){if(e == null)e = window.event;disableSelection(document.body);fspc.style.width = spcw + e.clientX - mousex  + "px";if(fspc.offsetWidth < 80)fspc.style.width = 80 + "px";document.onmouseup = dropH;return false;}function vStretching(e){if(e == null)e = window.event;disableSelection(document.body);fspc.style.height = spch + e.clientY - mousey  + "px";if(fspc.offsetHeight < 80)fspc.style.height = 80 + "px";document.onmouseup = dropH;return false;}function nwStretching(e){if(e == null)e = window.event;disableSelection(document.body);fspc.style.width = spcw + e.clientX - mousex  + "px";fspc.style.height = spch + e.clientY - mousey  + "px";if(fspc.offsetWidth < 80)fspc.style.width = 80 + "px";if(fspc.offsetHeight < 80)fspc.style.height = 80 + "px";document.onmouseup = dropH;return false;}function dropH(e){if(e == null)e = window.event;enableSelection(document.body);fspc.style.visibility = "hidden";fspcw = fspc.offsetWidth;fspch = fspc.offsetHeight;if(browsername == "Microsoft Internet Explorer"){spc.style.width = fspcw + "px";spc.style.height = fspch + "px";}else {spc.style.width = fspcw - 8 + "px";spc.style.height = fspch - 28 + "px";}spcw = spc.offsetWidth;spch = spc.offsetHeight;spcbr.style.height = spch + "px";spcbb.style.width = spcw + "px";sidew = side.offsetWidth;if(browsername == "Microsoft Internet Explorer") main.style.width = sidew + spcw + 20 + "px";else if(browseragent.match("Firefox") == "Firefox") main.style.width = sidew + spcw + 100 + "px";else if(browseragent.match("Chrome") == "Chrome") main.style.width = sidew + spcw + 20 + "px";else if(browseragent.match("Safari") == "Safari") main.style.width = sidew + spcw + 200 + "px";else if(browsername == "Opera") main.style.width = sidew + spcw + 20 + "px";else main.style.width = sidew + spcw + 120 + "px";focus.style.width = spcw + 8 + "px";document.onmousemove = null;document.onmouseup = null;return false;}function int(value){var n = parseInt(value);return n == null || isNaN(n) ? 0 : n;}function disableSelection(element){element.onselectstart = function(){return false;};element.unselectable = "on";element.style.MozUserSelect = "none";}function enableSelection(element){element.onselectstart = function(){return true;};element.unselectable = "off";element.style.MozUserSelect = "";}function saveClose(){footer.removeChild(savntc);}function saveWidth(savbut){var date = new Date();date.setTime(date.getTime()+(365*24*60*60*1000));var expires = date.toGMTString();var ozucswidthcookie ="Ozucswidth=" + spcw + ";expires=" + expires + ";path=/;";var ozucsheightcookie = "Ozucsheight=" + spch + ";expires=" + expires + ";path=/;";document.cookie = ozucswidthcookie;document.cookie = ozucsheightcookie;savbut.style.position = "relative";savbutx = savbut.offsetLeft;savbuty = savbut.offsetTop;savntc = document.createElement("div");savntc.innerHTML = "Page width and height settings successfully saved.";savntc.style.width = "200px";savntc.style.backgroundColor = "green";savntc.style.color = "white";savntc.style.padding = "10px";savntc.style.position = "absolute";savntc.style.zIndex = 10;savntc.style.left = savbutx + 20 + "px";savntc.style.top = savbuty - 50 + "px";	footer.appendChild(savntc);}function switchClose(){footer.removeChild(swintc);}function switchVersion(version, swibut){var versionstr;if(version == "Modern"){versionstr = "Modern Version Set. Refresh the page for the effect.";}else if(version == "Conventional"){versionstr = "Conventional Version Set. Refresh the page for the effect."}var date = new Date();date.setTime(date.getTime()+(365*24*60*60*1000));var expires = date.toGMTString();var ozucsversioncookie ="Ozucsversion=" + version + ";expires=" + expires + ";path=/;";document.cookie = ozucsversioncookie;swibut.style.position = "relative";swibutx = swibut.offsetLeft;swibuty = swibut.offsetTop;swintc = document.createElement("div");swintc.innerHTML = versionstr;swintc.style.width = "200px";swintc.style.backgroundColor = "green";swintc.style.color = "white";swintc.style.padding = "10px";swintc.style.position = "absolute";swintc.style.zIndex = 10;swintc.style.left = swibutx + 20 + "px";swintc.style.top = swibuty - 50 + "px";footer.appendChild(swintc);}