// JavaScript Document
var Macintosh = navigator.userAgent.indexOf('Mac')>0;

function firstresize(){
	//alert("dio");
	thisTargetWidth = screen.width;
	thisTargetHeight = screen.height;
	resizeWin(thisTargetWidth,thisTargetHeight);
}
function resizeWin(width,height) {
		//alert(width + "  " + height);
		thisTargetWidth = width;
		thisTargetHeight = height;
		//self.resizeTo(120,120);
		// NS6 HAS DECENT SUPPORT FOR THIS
		if (self.innerWidth) {
			//alert("NS6");
			frameWidth = self.innerWidth;
			frameHeight = self.innerHeight;
			realWidth = self.outerWidth;
			realHeight = self.outerHeight;
			//alert("real: "+realWidth+"x"+realHeight);
			widthMod = (realWidth - frameWidth);
			heightMod = (realHeight - frameHeight);
			
			wt=thisTargetWidth;
			ht=thisTargetHeight-25;
			//alert(wt + "  " + ht);
			//alert(self);
			self.moveTo(0,0);
			self.resizeTo(wt,ht);
			
		}
		// WHEREAS THE IE SUPPORT SUCKS ASSCOCK
		else {
			// ie4-ie4.5 mac
			if ((Macintosh) && (navigator.appVersion.indexOf("MSIE 4.") > 1)) {
				//alert("ie4-4.5 mac");
				window.resizeTo(thisTargetWidth,thisTargetHeight+101);
			}
			// ie5+ mac
			else if (Macintosh) {
				//alert("ie5 mac");
				if (self.screen.width > 1024) {
					window.moveTo(0,0);
				}
				else {
					window.moveTo(0,0);
				}
				window.resizeTo(thisTargetWidth,thisTargetHeight+107);
				
			}
			// ie pc
			else {
				//alert("ie pc");
				frameWidth = document.body.offsetWidth;
				frameHeight = document.body.offsetHeight;
				calcWidth = thisTargetWidth - frameWidth;
				calcHeight = thisTargetHeight - frameHeight + 3;
				window.moveTo(0,0);
				window.resizeBy(calcWidth,calcHeight);
			}
		}
	}
