/*
 * Copyright 2008 Exit Games GmbH, http://www.exitgames.com/
 * All rights reserved.
 */
function addEvent(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false);_EventCache.add(c,b,a)}else{if(c.attachEvent){c["e"+b+a]=a;c[b+a]=function(){c["e"+b+a](window.event)};c.attachEvent("on"+b,c[b+a]);_EventCache.add(c,b,a)}else{c["on"+b]=c["e"+b+a]}}}var _EventCache=function(){var a=[];return{listEvents:a,add:function(b,d,c){a.push(arguments)},flush:function(){var b,c;for(b=a.length-1;b>=0;b=b-1){c=a[b];if(c[0].removeEventListener){c[0].removeEventListener(c[1],c[2],c[3])}if(c[1].substring(0,2)!="on"){c[1]="on"+c[1]}if(c[0].detachEvent){c[0].detachEvent(c[1],c[2])}c[0][c[1]]=null}}}}();function handleEventCall(a){if(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}}return false}function _fixUnload(){if(document.readyState=="interactive"){function a(){document.detachEvent("onstop",a);unloadWindow()}document.attachEvent("onstop",a);window.setTimeout(function(){document.detachEvent("onstop",a)},0)}}addEvent(window,"beforeunload",_fixUnload);