JPYSites ={$: function (id){return document.getElementById(id);},webRoot: '',checkAuthorName: function (sender,args){args.IsValid = true;if (JPYSites.comments.checkName){var author = JPYSites.comments.postAuthor;var visitor = JPYSites.comments.nameBox.value;args.IsValid = !this.equal(author,visitor);}},createCallback: function (url,callback){var http = JPYSites.getHttpObject();http.open("GET",url,true);http.onreadystatechange = function (){if (http.readyState == 4){if (http.responseText.length > 0 && callback != null)
callback(http.responseText);}};http.send(null);},getHttpObject: function (){if (typeof XMLHttpRequest != 'undefined')
return new XMLHttpRequest();try{return new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch (e){}}return false;},equal: function (first,second){var f = first.toLowerCase().replace(new RegExp(' ','gi'),'');var s = second.toLowerCase().replace(new RegExp(' ','gi'),'');return f == s;},addLoadEvent: function (func){var oldonload = window.onload;if (typeof window.onload != 'function'){window.onload = func;}else{window.onload = function (){oldonload();if (func != undefined){func();}}}},getCookieValue: function (name){var cookie = new String(document.cookie);if (cookie != null && cookie.indexOf('comment=') > -1){var start = cookie.indexOf(name + '=') + name.length + 1;var end = cookie.indexOf('&',start);if (end > start && start > -1)
return cookie.substring(start,end);}return null;}};if (typeof ($) == 'undefined') window.$ = JPYSites.$;if (typeof (registerVariables) != 'undefined') JPYSites.addLoadEvent(registerVariables);function openNewsContent(id){window.scrollTo(0,0);var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;var height = document.documentElement.clientHeight + document.documentElement.scrollTop;var layer = document.createElement('div');layer.style.zIndex = 1002;layer.id = 'newslayer';layer.style.position = 'absolute';layer.style.top = '0px';layer.style.left = '0px';layer.style.height = document.documentElement.scrollHeight + 'px';layer.style.width = width + 'px';layer.style.backgroundColor = 'black';layer.style.opacity = '.6';layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");document.body.style.position = 'static';document.body.appendChild(layer);var size ={'height': 500,'width': 750};var iframe = document.createElement('iframe');iframe.name = 'NewsBoard';iframe.id = 'NewsBoard';iframe.src = JPYSites.webRoot + 'News.aspx?' + id;iframe.style.height = size.height + 'px';iframe.style.width = size.width + 'px';iframe.style.position = 'fixed';iframe.style.zIndex = 1003;iframe.style.backgroundColor = 'white';iframe.style.border = '1px solid silver';iframe.frameborder = '0';iframe.style.top = ((height + document.documentElement.scrollTop) / 2) - (size.height / 2) + 'px';iframe.style.left = (width / 2) - (size.width / 2) + 'px';document.body.appendChild(iframe);}function closeNewsContent(){document.body.removeChild(JPYSites.$('NewsBoard'));document.body.removeChild(JPYSites.$('newslayer'));document.body.style.position = '';}