	function getAbsY(elt) { return (elt.y) ? elt.y : getAbsPos(elt,"Top"); }

function getAbsPos(elt,which) {
 		var iPos = 0;
			while (elt != null) {
  				iPos += elt["offset" + which];
  				elt = elt.offsetParent;
 			}
 		return iPos;
	}
	
	function getWinHeight()  {
		if (browser == 'ns4' || browser == 'ns7')  {
			return window.innerHeight;
		}else if (browser == 'ns6')  {
				if(window.innerHeight){
					return window.innerHeight;
				}else{
					return document.clientHeight;
				}
		}else if (browser == 'ie5' || browser == 'ie6' || browser == 'ie55')  {
				return document.body.clientHeight
		
		}else{
			return false;
		}
	}
	
	
	function browserDetect()  {
		var ns4 = (document.layers)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4) ? 'ns4' : false;
		var ie4 = (document.all)&&(navigator.appName.indexOf("Microsoft") > -1)&&(parseInt(navigator.appVersion)==4)&&(navigator.appVersion.indexOf('MSIE 6') <0) ? 'ie4' : false;
		var ie5 = (document.getElementById)&&(navigator.appName.indexOf("Microsoft") > -1)&&(navigator.appVersion.indexOf('MSIE 6') <0) ? 'ie5' : false;
		var ie6 = (document.getElementById)&&(navigator.appName.indexOf("Microsoft") > -1)&&(navigator.appVersion.indexOf('MSIE 6') >=0) ? 'ie6' : false;
		var ns6 = (document.getElementById)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)>4 && parseInt(navigator.appVersion)<7) ? 'ns6' : false;
		var ns7 = (document.getElementById)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)>6) ? 'ns7' : false;
		
		return (ns4 || ie5 || ie4 || ns6 || ie6 || ns7);
	}
	var browser = browserDetect();
	
	
	
	
	
	function SBinit(){
				
		var winH = parseInt(getWinHeight());
		
		var contH1 = parseInt(document.getElementById('footer').offsetHeight) + parseInt(getAbsY( document.getElementById('footer') ));
		
		var contH2 = parseInt(getAbsY( document.getElementById('container') ))
						
		document.getElementById('container').style.marginTop = ((winH - (contH1 - contH2))/2 > 0 ? (winH - (contH1 - contH2))/2 : 0);
		document.getElementsByTagName('body')[0].style.backgroundPosition="center " + (((winH - (contH1 - contH2))/2 > 0  ? (winH - 1000)/2 : -(1000 - (contH1 - contH2))/2) +60);
		document.getElementById('container').style.visibility="visible";
	}
	





	
	
	
	