/*Footer position*/


window.onresize = handleMoveFooter;
window.onscroll = handleMoveFooter;


function getWindowSize ()
{
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}

}

var movefooterinterval = 0;
function handleMoveFooter() {
	var additional = 0;
	if (document.all)
	{
	var offset = 0;
	if(document.documentElement && document.documentElement.scrollTop)
        	{
        	offset = document.documentElement.scrollTop;
        	}
	else if(document.body && document.body.scrollTop)
       	 	{
        	offset = document.body.scrollTop;
        	}
	if(document.body && document.body.scrollWidth>document.body.clientWidth)
		{
			additional=0;
		}
	else if(document.documentElement && document.documentElement.scrollWidth > document.documentElement.clientWidth) 
		{
		additional=0;
		}
	}
	else
	{
		offset = window.pageYOffset;
		if (window.innerWidth<770)
		{
			additional=16;
		}
	}

	getWindowSize ();
	if (document.all)
		newH=winH-18+offset-additional;
	else
		newH=winH-18+offset-additional;
	if (newH<100)
		newH=100;

var newheight = newH + 'px';
document.getElementById('container-foot').style.top= newheight;
	if (document.all)
	{}
	else
	{
		clearInterval(movefooterinterval);
		movefooterinterval = setInterval('handleMoveFooter()', 500)
	}
}
function newhandle()
{
        additional = 0;
        if (document.all)
        {
                offset = document.body.scrollTop;
                if (document.body.scrollWidth<document.body.clientWidth)
                {
                        additional=16;
                }
        }
        else
        {
                offset = window.pageYOffset;
	       if (window.innerWidth<770)
                {
                        additional=16;
                }
        }
 getWindowSize ();
alert('winH' + winH);

        if (document.all)
                newH=winH-22+offset-additional;
        else
                newH=winH-22+offset-additional;
        if (newH<100)
                newH=100;
alert('new H' + newH);
alert('kk:' +document.getElementById('container-foot').style.top);
document.getElementById("container-foot").style.top= newH + 'px';
}

function newpositionFooter()
{
alert('new position');
}
function newinitializefooter()
	{
alert('new init - - debugging!');
document.getElementById("container-foot").style.position='absolute';
document.getElementById("container-foot").style.top='10px';
alert(document.getElementById("container-foot").style.position);
newhandle();
}

function initializefooter() {
	document.getElementById("container-foot").style.position="absolute";
	handleMoveFooter();
}




		function positionFooter ()
		{

initializefooter();

		}
