// <![CDATA[

var bFirst = false;
var windowState = (function(){
var readScroll = {scrollLeft:0,scrollTop:0};
var readSize = {clientWidth:0,clientHeight:0};
var readScrollX = 'scrollLeft';
var readScrollY = 'scrollTop';
var readWidth = 'clientWidth';
var readHeight = 'clientHeight';
function browserDetection(){
var str;
str='navigator.appCodeName: '+navigator.appCodeName;
str+='navigator.appName: '+navigator.appName;
str+='navigator.appVersion: '+navigator.appVersion;
str+='navigator.cookieEnabled: '+navigator.cookieEnabled;
str+='navigator.language: '+navigator.language;
str+='navigator.mimeTypes: '+navigator.mimeTypes;
str+='navigator.platform: '+navigator.platform;
str+='navigator.plugins: '+navigator.plugins;
str+='navigator.systemLanguage: '+navigator.systemLanguage;
str+='navigator.userAgent: '+navigator.userAgent;
document.getElementById('description').innerHTML=str;
}
function otherWindowTest(obj){
if((document.compatMode)&&
(document.compatMode == 'CSS1Compat')&&
(document.documentElement)){
return document.documentElement;
}else if(document.body){
return document.body;
}else{
return obj;
}
};
if((typeof this.innerHeight == 'number')&&
(typeof this.innerWidth == 'number')){
readSize = this;
readWidth = 'innerWidth';
readHeight = 'innerHeight';
}else{
readSize = otherWindowTest(readSize);
}
if((typeof this.pageYOffset == 'number')&&
(typeof this.pageXOffset == 'number')){
readScroll = this;
readScrollY = 'pageYOffset';
readScrollX = 'pageXOffset';
}else{
readScroll = otherWindowTest(readScroll);
}
return {
getScrollX:function(){
return (readScroll[readScrollX]||0);
},
getScrollY:function(){
return (readScroll[readScrollY]||0);
},
getWidth:function(){
return (readSize[readWidth]||0);
},
getHeight:function(){
return (readSize[readHeight]||0);
}
};
})();

function setCenterDiv()
{
	window.onresize = windowResize;
	windowResize();
}

function windowResize()
{

	var oDiv = document.getElementById("divCenter");
	var oImage = document.getElementById("mainImage");
	var oDebug = document.getElementById("debug");
	var width=600;
	var width2=600;
	if (oDiv && oImage)
	{
		oDiv.style.width = width+'px';
		//oDiv.style.height = width+'px';
		//if (((windowState.getHeight()/2) - (height/2)) < 25)
		//	oDiv.style.top = 25+'px';
		//else
		//	oDiv.style.top=((windowState.getHeight()/2) - (height/2))+'px';
		oDiv.style.left=((windowState.getWidth()/2) - (width2/2))+'px';
		
		//oDebug.innerHTML = 'v0.01';
		
		if (!bFirst)
		{
			oDiv.style.opacity = 0;
			oDiv.style.filter = 'alpha(opacity=0)';
			oDiv.style.display = "block";
			$('divCenter').fade({ from: 0, to: 1.0, duration: 0.7 });
			//jQuery("p").show("slow");
			//jQuery("p").animate({ opacity: "show" }, "slow")
			bFirst = true;
		}
		//$('mainImage').fade({ duration: 3.0 });
	}
}

// ]]>
