// JavaScript Document


var php_self="/index.php";
document.body.onunload=function (){
    //alert();
};

function _(ename){
    return document.getElementById(ename);
}

function getWidth(){
    var x = 0;
    if (self.innerHeight){
            x = self.innerWidth;
    }else if (document.documentElement && document.documentElement.clientHeight){
            x = document.documentElement.clientWidth;
    }else if (document.body){
            x = document.body.clientWidth;
    }
    return x;
}
 
function getHeight(){
    var y = 0;
    if (self.innerHeight){
            y = self.innerHeight;
    }else if (document.documentElement && document.documentElement.clientHeight){
            y = document.documentElement.clientHeight;
    }else if (document.body){
            y = document.body.clientHeight;
    }
    return y;
}

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11615395-4']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

function renewWin(){
	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-20;
	    }
	}
}

function respos(){ 
    //_('dynamicbutton').style.pixelLeft=document.body.scrollLeft+50;
    //$('dynamicbutton').style.pixelTop=window.screen.height+document.body.scrollTop-300;
    //var winH = window.innerHeight+document.documentElement.clientHeight;
    renewWin();
    var labeller_layer = _('dynamicbutton');
    var scrollTope = document.documentElement.scrollTop+document.body.scrollTop+winH-300;
    //labeller_layer.style.top = scrollTope  + 'px';
    //alert(winH);
}
