if (!DetectFlashVer(9, 0, 0)) {
   //window.location.href = 'mobile/';
   window.location.href = 'no-flash.htm';
} else {
	$(document).ready(function(){
	/*	if (isNewWindow()){
			if(window.opener){
				innerFlash();
				window.opener.location.href = 'splash.htm';
				var windowWidth = window.outerWidth || document.documentElement.clientWidth;
				var windowHeight = window.outerHeight || document.documentElement.clientHeight;
				window.moveTo((screen.width/2)-(windowWidth/2+4),(screen.height/2)-(windowHeight/2+30));
			} else {
				var maxW  = screen.availWidth > 2300 ? 1680 : screen.availWidth-8;
				var maxH  = screen.availHeight > 1280 ? 1280 : screen.availHeight-33;
				callOpen(window.location.href, maxW, maxH);	
				//
				setTimeout(function(){
					window.location.href = 'splash.htm';			
				},1000);
			}		
		} else {*/
			innerFlash();		
		//}
	});		
}

function innerFlash(){	
		$('#main').css('display', 'block');
		$('#main-media').media({
			version: '8,0', width: '100%', height: '100%', autoplay: true, src: 'swf/site.swf',	caption: false,
			flashvars: {chatStatus:stat,_IP:_IP},
			attrs: { id: 'flashSite'},
			params: {
				allowScriptAccess: 'sameDomain',
				bgColor:"#000000",
				quality: 'autohigh'
			}
		});
}

function isNewWindow(){
	if (screen.width > 2300 || screen.width < 800){
		return true;
	}
}

function callOpen(openPage, width, height){
	window.open(openPage, "corpusMotel", "'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,left=0,top=0,width="+width+",height="+height+ "'");
}
