function makeMailTo(user, domain, subject, bodytext, link_txt){
	if (user!=""){
		document.write('<a class=\"header\" href=\"mailto:' + user + '@' + domain + '?subject=' + subject + '&body=' + bodytext + '\">'); 
		document.write(link_txt + '</a>');
	}else{
		document.write('<a class=\"header\">'); 
		document.write(link_txt + '</a>');
	}
}



function openPopUp(src, ww, hh){
	var width = ww;
	var height = hh;
	var l = ( screen.width - width )/2;
	var t = ( screen.height - height )/2 - 20;
	l=l-200;
	t=t-200;
	url = src;
	window.open( url, "_blank", "directories=0,location=0,menubar=0,titlebar=0,toolbar=0,scrollbars=0,resizable=0,left="+l+",top="+t+",width="+width+",height="+height );
}




// Mooving banner

var divId = 'div_banner';
var tableId = 'table_banner'
var bWidth = 798;

var shift = 1;
var leftPos;

function start()
{
    setInterval("roll()", 30);
   	vAlignment();
    document.getElementById(divId).style.visibility = 'visible';
	//alert(window.innerHeight);
}


function returnHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}


function vAlignment()
{
	
	//var IEE = document.all?true:false;
	//alert('seit');
	// document.getElementById(divId).style.left = 0;
    myH=returnHeight();
	if (browser.isOpera){
		//alert('opera');
        document.getElementById(divId).style.top = (document.documentElement.scrollTop + window.innerHeight -  bHeight);
    }else if(browser.isGecko){
        //alert('mozilla');
		//alert(document.body.offsetHeight+"+"+myH+"+"+document.body.clientHeight);
		//document.getElementById(divId).style.top = document.body.clientHeight+'';
	}else{
		//alert('opera');
		document.getElementById(divId).style.top = (document.documentElement.scrollTop + myH - bHeight);
	}
		
    document.getElementById(divId).style.width = document.body.clientWidth;
}

function roll()
{
    if ((document.all || document.getElementById ) && browser.isGecko==false)
    {
        leftPos = parseInt(document.getElementById(tableId).style.left);
		//alert('aa:'+leftPos);
        document.getElementById(tableId).style.left = leftPos - shift;
        if (Math.abs(leftPos) >= bWidth)
        {
			
            document.getElementById(tableId).style.left = (-shift);
			
        }
    }
}


function someA(){
	alert('tut');
}

function showBanner(bBody)
{
    if(browser.isGecko==true){
	//	var position;
	    
	//	position = "fixed";
	    
		//document.write('<div id="' + divId + '" onMouseout="shift=1" onMouseover="shift=0" style="top: '+document.body.clientHeight+'; border: 0px;visibility:hidden;overflow:hidden;position:' + position + ';left:0px;width:' + document.body.clientWidth + 'px;height:' + bHeight + 'px;z-index:5;">');
	  //  document.write('<table class="tblBnrrr" cellspacing=0 cellpadding=0 id="' + tableId + '" style="border: 0px;position:absolute;left:0;top:0;width:' + (bWidth * 4) + 'px"><tr><td>' + bBody + '</td></table></div>');
		//setTimeout("start()", 1000);
	}else{
		var position;
	    if (window.attachEvent)
	    {
	        window.attachEvent("onresize", vAlignment);
			window.attachEvent("onscroll", vAlignment);
	        
			
			//window.attachEvent("onresize", vAlignment);
			//window.attachEvent("onresize", someA);
	        position = "absolute";
	    }
	    else
	    {
	        window.addEventListener("resize", vAlignment, 1);
	        position = "fixed";
	    }
	
	    //alert(document.body.clientWidth);
		document.write('<div id="' + divId + '" onMouseout="shift=1" onMouseover="shift=0" style="border: 0px;visibility:hidden;overflow:hidden;position:' + position + ';left:0px;width:' + document.body.clientWidth + 'px;height:' + bHeight + 'px;z-index:5;">');
	    document.write('<table class="tblBnrrr" cellspacing=0 cellpadding=0 id="' + tableId + '" style="border: 0px;position:absolute;left:0;top:0;width:' + (bWidth * 4) + 'px"><tr><td>' + bBody + '</td></table></div>');
		//alert(bWidth);
	    setTimeout("start()", 1000);
	}
}



