var EXAMP = {
	init : function() {
		if (EXAMP.browser.bIe6) EXAMP.pngFix();
		if (YAHOO.util.Dom.get('weather')) {
			var weather = YAHOO.util.Dom.get('weather');
			var weatherTitle = weather.getElementsByTagName('tr');
			YAHOO.util.Dom.setStyle([weatherTitle[0], weatherTitle[2]], 'display', 'none');
		}
		
		var checkBg = function(e) {
			YAHOO.util.Dom.setStyle(document.body, 'height', (YAHOO.util.Dom.get('bg').offsetHeight>YAHOO.util.Dom.getViewportHeight())?'auto':(YAHOO.util.Dom.getViewportHeight()-4)+'px');
		}
		checkBg();
		
		YAHOO.util.Event.on(window, 'resize', checkBg);
	},
	pngFix : function() {
		for (var i=0; i<document.images.length; i++) {
			var img = document.images[i];
			var imgName = img.src.toUpperCase();
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
				 var imgID = (img.id) ? "id='" + img.id + "' " : "";
				 var imgClass = (img.className) ? "class='" + img.className + " img' " : "class='img'";
				 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
				 var imgStyle = "display:inline-block;" + img.style.cssText;
				 if (img.align == "left") imgStyle = "float:left;" + imgStyle;
				 if (img.align == "right") imgStyle = "float:right;" + imgStyle;
				 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
				 var strNewHTML = "<span " + imgID + imgClass + imgTitle
				 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
				 img.outerHTML = strNewHTML;
				 i = i-1;
			}
		}
	} 
};
var ua=navigator.userAgent.toLowerCase();EXAMP.env={};EXAMP.env.sUA=navigator.userAgent.toLowerCase();EXAMP.env.fVersion=navigator.appVersion;EXAMP.browser={bNetscape4:(typeof document.layers !="undefined")?true:false,bSafari:(EXAMP.env.sUA.indexOf("safari")!=-1),bKonqueror:(EXAMP.env.sUA.indexOf("konqueror")!=-1),bNetscape6:(EXAMP.env.sUA.indexOf("netscape")!=-1),bMozilla:((EXAMP.env.sUA.indexOf("mozilla")!=-1)&&(EXAMP.env.sUA.indexOf("gecko")!=-1)&&(EXAMP.env.sUA.indexOf("konqueror")==-1)),bFirefox:(EXAMP.env.sUA.indexOf("firefox")!=-1),bOpera:(EXAMP.env.sUA.indexOf("opera")!=-1),bIe:((EXAMP.env.sUA.indexOf("msie")!=-1)&&(EXAMP.env.sUA.indexOf("opera")==-1)),bIe4:((EXAMP.env.sUA.indexOf("msie 4.")!=-1)&&(EXAMP.env.sUA.indexOf("opera")==-1)),bIe5:((EXAMP.env.sUA.indexOf("msie 5.")!=-1)&&(EXAMP.env.sUA.indexOf("opera")==-1)),bIe6:((EXAMP.env.sUA.indexOf("msie 6.")!=-1)&&(EXAMP.env.sUA.indexOf("opera")==-1)),bIe7:((EXAMP.env.sUA.indexOf("msie 7.")!=-1)&&(EXAMP.env.sUA.indexOf("opera")==-1)),bOmniWeb:(EXAMP.env.sUA.indexOf("omniweb")!=-1),bWebTv:(EXAMP.env.sUA.indexOf("webtv")!=-1),bICab:(EXAMP.env.sUA.indexOf("icab")!=-1),bMac:(EXAMP.env.sUA.indexOf("mac")!=-1),ua:EXAMP.env.sUA.userAgent,fVersion:parseFloat(EXAMP.env.fVersion),setCookie:function(sName,sValue,iExpYear,iExpMonth,iExpDay,sPath,sDomain,bSecure){var sCookie=sName+"="+encodeURIComponent(sValue);if(iExpYear&&iExpMonth&&iExpDay){var oExpireDate=new Date(iExpYear,iExpMonth,iExpDay);sCookie += "; expires="+oExpireDate.toGMTString();}if(sPath){sCookie += "; path="+encodeURIComponent(sPath);}if(sDomain){sCookie += "; domain="+encodeURIComponent(sDomain);}if(bSecure){sCookie += "; secure";}document.cookie=sCookie;},getCookie:function(sName){var iStart=document.cookie.indexOf(sName+"=");var iLen=iStart+sName.length+1;if(!iStart&&(sName!=document.cookie.substring(0,sName.length))){return null;}if(iStart==-1){return null;}var iEnd=document.cookie.indexOf(";",iLen);if(iEnd==-1){iEnd=document.cookie.length;}return decodeURIComponent(document.cookie.substring(iLen,iEnd));},deleteCookie:function(sName){var oExpireDate=new Date();oExpireDate.setTime(oExpireDate.getTime()-1);document.cookie=sName += "=; expires="+oExpireDate.toGMTString();},getBrowserInfo:function(){var sOs="Others";if(EXAMP.env.sUA.indexOf("linux")!=-1){sOs="Linux";}else if(EXAMP.env.sUA.indexOf("x11")!=-1){sOs="Unix";}else if(EXAMP.env.sUA.indexOf("mac")!=-1){sOs="Mac";}else if(EXAMP.env.sUA.indexOf("win")!=-1){sOs="Windows";}var sBrowser="Others";if(EXAMP.browser.bIe){sBrowser="Internet Explorer";}else if(EXAMP.browser.bNetscape4||EXAMP.browser.bNetscape6){sBrowser="Netscape Navigator";}else if(EXAMP.browser.bOpera){sBrowser="Opera";}else if(EXAMP.browser.bSafari){sBrowser="Safari";}else if(EXAMP.browser.bKonqueror){sBrowser="Konqueror";}else if(EXAMP.browser.bMozilla&&!EXAMP.browser.bFirefox){sBrowser="Mozilla";}else if(EXAMP.browser.bFirefox){sBrowser="Firefox";}else if(EXAMP.browser.bOmniWeb){sBrowser="OmniWeb";}else if(EXAMP.browser.bWebTv){sBrowser="WebTv";}else if(EXAMP.browser.bICab){sBrowser="iCab";}return [sOs,sBrowser,EXAMP.browser.fVersion];},getResolution:function(){return [screen.width,screen.height];},getSize:function(){var iDocWidth=0;var iDocHeight=0;var iWinWidth;var iWinHeight;if(typeof window.innerWidth=="number"){iWinWidth=window.innerWidth;iWinHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){iWinWidth=document.documentElement.clientWidth;iWinHeight=document.documentElement.clientHeight;}else if(document.body&&document.body.clientWidth){iWinWidth=document.body.clientWidth;iWinHeight=document.body.clientHeight;}if(typeof window.innerWidth=="number"){if(window.innerWidth>0&&window.innerWidth>iDocWidth){iDocWidth=window.innerWidth;}if(window.innerHeight>0&&window.innerHeight>iDocHeight){iDocHeight=window.innerHeight;}}if(document.body&&typeof document.body.clientWidth=="number"){if(document.body.clientWidth>0&&document.body.clientWidth>iDocWidth){iDocWidth=document.body.clientWidth;}if(document.body.clientHeight>0&&document.body.clientHeight>iDocHeight){iDocHeight=document.body.clientHeight;}}if(document.documentElement&&typeof document.documentElement.clientWidth=="number"){if(document.documentElement.clientWidth>0&&document.documentElement.clientWidth>iDocWidth){iDocWidth=document.documentElement.clientWidth;}if(document.documentElement.clientHeight>0&&document.documentElement.clientHeight>iDocHeight){iDocHeight=document.documentElement.clientHeight;}}return [iWinWidth,iWinHeight,iDocWidth,iDocHeight];},getScroll:function(){var iScrollLeft=0;var iScrollTop=0;if(typeof window.pageXOffset=="number"){if(window.pageXOffset>0&&window.pageXOffset>iScrollLeft){iScrollLeft=window.pageXOffset;}if(window.pageYOffset>0&&window.pageYOffset>iScrollTop){iScrollTop=window.pageYOffset;}}if(document.body&&typeof document.body.scrollLeft=="number"){if(document.body.scrollLeft>0&&document.body.scrollLeft>iScrollLeft){iScrollLeft=document.body.scrollLeft;}if(document.body.scrollTop>0&&document.body.scrollTop>iScrollTop){iScrollTop=document.body.scrollTop;}}if(document.documentElement&&typeof document.documentElement.scrollLeft=="number"){if(document.documentElement.scrollLeft>0&&document.documentElement.scrollLeft>iScrollLeft){iScrollLeft=document.documentElement.scrollLeft;}if(document.documentElement.scrollTop>0&&document.documentElement.scrollTop>iScrollTop){iScrollTop=document.documentElement.scrollTop;}}return [iScrollLeft,iScrollTop];},redirectUnsupportedBrowser:function(sRedirectUrl){var browserUpgradeFile="";var sCurrentFileName=EXAMP.getCurrentFileName();if(!document.getElementById&&(browserUpgradeFile.indexOf(sCurrentFileName)=="-1"||sCurrentFileName === "")){window.location.replace(sRedirectUrl);}}};

YAHOO.util.Event.onDOMReady(EXAMP.init);
