function changePosi() {
	if (document.getElementById) {
		// get the new dimensions
		var w,h;
		if (self.innerHeight) { 
			// all except Explorer
			w = self.innerWidth;
			h = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { 
			// Explorer 6 Strict Mode 
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		} else if (document.body) { 
			// other Explorers	
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
		// adjust to it
		wrapObj=document.getElementById('wrap');
		if (w<660) {
			wrapObj.className="layout2";
		} else {
			wrapObj.className="layout1";
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", changePosi, false);
	window.addEventListener("resize", changePosi, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", changePosi);
	window.attachEvent("onresize",changePosi);
}
