/*
* Copyright 2009 Exit Games GmbH, http://www.exitgames.com/
* All rights reserved.
*/
var screenX=screen.width;var screenY=screen.height;var windowObjectReference=null;var offsetURL="";var defaultURL="default.aspx";function setWindowName(a){window.name=((a=="")||(a==null)||(typeof(a)=="undefined"))?"not defined":a;debugOut("setWindowName: "+window.name)}function getWindowName(){return window.name}function getWindow(a){if((typeof(a)!=="undefined")&&(a!=="")&&(a!==null)){if(this.name==a){return this}try{if((windowObjectReference!==null)&&(typeof(windowObjectReference.self)=="object")){if(windowObjectReference.name==a){debugOut("return child window object reference");return windowObjectReference}else{debugOut("child window present but not named "+a)}}if((window.opener!==null)&&(typeof(window.opener.self)=="object")){if(window.opener.name==a){debugOut("return parent window object reference");return window.opener}else{debugOut("parent window present but not named "+a)}}}catch(b){debugOut("failed to access window.opener, am I opened via e-mail or other domain?")}}return false}function closeWindow(a){if((typeof(a)!=="undefined")&&(a!=="")&&(a!==null)){windowObjectReference=getWindow(a);if(windowObjectReference!==false){windowObjectReference.close();return true}else{return false}}}function focusAndLoad(a){try{if((windowObjectReference!==null)&&(typeof(windowObjectReference.self)=="object")){if((typeof(a)=="undefined")||(a=="")||(a==null)){windowObjectReference.focus()}else{if((windowObjectReference.location.toString().indexOf(unescape(a),0)==-1)||(windowObjectReference.name=="site")){windowObjectReference.top.location=(offsetURL=="")?a:offsetURL+a}windowObjectReference.focus()}}else{debugOut("no window object found to set focus to!")}}catch(b){}debugOut("reset focus using alerts due to standard tab behaviour ... ?/")}function openWindow(a){windowObjectReference=getWindow(a);if(windowObjectReference==false){windowObjectReference=null;try{debugOut("opening new window: "+a);if(a=="client"){windowObjectReference=window.open("",a,"width="+wgtWidth+",height="+wgtHeight+",left="+centeredLeftX+",top="+centeredTopY+",menubar=no,location=no,titlebar=no,toolbar=no,status=no,resizable=yes,scrollbars=no")}else{windowObjectReference=window.open("",a,"")}if((windowObjectReference!==null)||(typeof(windowObjectReference.self)=="object")){return windowObjectReference}else{throw ("failedOpen")}}catch(b){if(b=="failedOpen"){debugOut("failed to get a window handle!")}}}else{return windowObjectReference}}function openWindowAndLoadUrl(d,a){if((typeof(d)=="undefined")||(d=="")||(d==null)){d=defaultURL}var c=openWindow(a);if(c!==false){focusAndLoad(d);if(a=="client"){var b=readCookie("suppress_popup_blocker_notice");if(b!="true"){setTimeout(function(){_checkForPopupBlocker(c,"showPopupBlockerNotice")},3000)}}}}function _checkForMinimumResolution(a){if((screenX<=1024)||(screenY<=768)){window[a](false)}else{var c=0,b=0;if(typeof(window.innerWidth)=="number"){c=window.innerWidth;b=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){c=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){c=document.body.clientWidth;b=document.body.clientHeight}}}if((b<wgtHeight)||(c<wgtWidth)){window[a](false)}else{window[a](true)}}}function _checkForPopupBlocker(b,a){window[a](_hasPopupBlocker(b))}function _hasPopupBlocker(b){var a=false;try{if(typeof b=="undefined"){a=true}else{if(b&&b.closed){a=false}else{if(b&&b.test){a=false}else{a=true}}}}catch(c){}return a};