// JavaScript Document

function copyright(){
	var startyear = 2009;
	var cp = new Date();
	var now = cp.getYear();

	if(now < 1900){
		nowyear = now + 1900;
	}else{
		nowyear = now;
	}

	if( nowyear > startyear ){
		document.write( startyear + '-' + nowyear );
	}else{
		document.write( startyear );
	}
}

var isWin9X = (navigator.appVersion.toLowerCase().indexOf('windows 98')+1);
var isIE =    (navigator.appName.toLowerCase().indexOf('internet explorer')+1?1:0);
var isIE6;
var isIE8 =   navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Trident/4.0")!=-1?1:0;
var isOpera = (navigator.userAgent.toLowerCase().indexOf('opera')+1?1:0);
if (isOpera) isIE = false;
var isSafari = (navigator.appVersion.toLowerCase().indexOf('safari')+1?1:0);

function footerfix() {

	var obj = new Object();
	if (!isSafari && !isOpera) {
	obj.x = document.documentElement.clientWidth || document.body.clientWidth || document.body.scrollWidth;
	} else {
	obj.x = window.innerWidth;
	}
	
	if( navigator.appVersion.indexOf( 'MSIE 6' ) > 0){;
		isIE6 = 1;
	}else{
		isIE6 = 0;
	}

	var h = Math.max( document.body.clientHeight , document.body.scrollHeight );
	h = Math.max( h , document.documentElement.scrollHeight );
	h = Math.max( h , document.documentElement.clientHeight );

	if( isSafari && window.innerHeight < h ){
		obj.x = obj.x - 16;
	}
	
	if(obj.x < 960){
		obj.x = 960;
	}
	if(isIE8){
		posx = Math.floor( ( obj.x - 960 ) / 2 * (-1) );
	}else{
		posx = Math.ceil( ( obj.x - 960 ) / 2 * (-1) );
	}
	document.getElementById('footer').style.width = obj.x + 'px';
	document.getElementById('footer').style.left = posx + 'px';
	document.getElementById('corpname').style.left = (obj.x-960)/2 + 10 + 'px';
	if( isIE6 ){
		document.getElementById('footer').style.bottom = '-1px';
	}
}
