var tabHome = 1;
	function f_setTB_home(id,act,ss){
		if(act==1){//mouseover
			if(tabHome!=id) document.getElementById('tbHOME_'+id).className = 'bt_home_over';
		}else if(act==2){//click
			for(a=1;a<4;a++){
				document.getElementById('tbHOME_'+a).className = 'bt_home_off';
				document.getElementById('contentHOME_'+a).style.display = 'none';
			}
			document.getElementById('tbHOME_'+id).className = 'bt_home_on';
			tabHome = id;
			document.getElementById('contentHOME_'+id).style.display = 'block';
                        if(id==2 && ss>0){
                            document.getElementById('tb_2_2_1').style.display = 'none';
                            document.getElementById('tb_2_2_2').style.display = 'none';
                            document.getElementById('tb_2_2_'+ss).style.display = 'block';
                        }else {
                            document.getElementById('tb_2_2_1').style.display = 'none';
                            document.getElementById('tb_2_2_2').style.display = 'none';
                        }
		}else if(act==3){//mouseout
			if(tabHome!=id) document.getElementById('tbHOME_'+id).className = 'bt_home_off';
		}
	}
	
	
	
	function loadFailure() {
	    alert("'" + this.name + "' failed to load.");
	    return true;
	}

	function getWidthAndHeight() {
	    //alert("'" + this.name + "' is " + this.width + " by " + this.height + " pixels in size.");	    	   
	    printDel = '<table border="0" cellspacing="0" cellpadding="0" width="100">\
					<tr><td align="center"><img border="0" src="'+this.src+'"></td></tr>\
					<tr><td align="right" style="padding-right: 5px;height:15px;"><a href="javascript:f_hideIMG();"><img border="0" src="http://www.himonitor.com/images/closeW.png" width="7" height="7"></a></td></tr>\
					</table>';
		
		var tmpPOS_top = (document.body.clientHeight - (this.height+15))/2;
		
		document.getElementById('div_abs_ShowIMG').innerHTML = printDel;
		f_GENERAL_div_lock_screen_show(0);
	    var w_screen = (document.body.clientWidth/2) - (this.width/2);
	    var h_screen = (document.body.clientHeight/2) - (this.height/2);
	
	    document.getElementById('div_abs_ShowIMG').style.top = window.pageYOffset+tmpPOS_top;

	    document.getElementById('div_abs_ShowIMG').style.left = w_screen;
	    document.getElementById('div_abs_ShowIMG').style.width = this.width+10;
	    document.getElementById('div_abs_ShowIMG').style.height= this.height+10;
	    document.getElementById('div_abs_ShowIMG').style.display="block";
	    return true;
	}
	function f_showIMG(urlImg){
				
		var myImage = new Image();
		myImage.name = 'http://www.himonitor.com/images/'+urlImg;
		myImage.onload = getWidthAndHeight;
		myImage.onerror = loadFailure;
		myImage.src = 'http://www.himonitor.com/images/'+urlImg;
	}
	function f_hideIMG(){
				
		document.getElementById('div_abs_ShowIMG').innerHTML = '';
		document.getElementById('div_abs_ShowIMG').style.top = 0;
		document.getElementById('div_abs_ShowIMG').style.left = 0;
		document.getElementById('div_abs_ShowIMG').style.width = 0;
		document.getElementById('div_abs_ShowIMG').style.height = 0;
		document.getElementById('div_abs_ShowIMG').style.display = 'none';
		f_GENERAL_div_lock_screen_hide(0);
	}

	
	function f_GENERAL_div_lock_screen_show(nameDiv){
    	var nomeDiv = '';
	    if(!nameDiv || nameDiv.length==0) nomeDiv = 'div_lock_screen';
	    document.getElementById(nomeDiv).style.display = 'block';
	    document.body.style.overflow = 'hidden';
	    var wscreen = document.body.clientWidth;
	    var hscreen = document.body.clientHeight;
	    document.getElementById(nomeDiv).style.top = window.pageYOffset;
	    document.getElementById(nomeDiv).style.width = wscreen +'px';
	    document.getElementById(nomeDiv).style.height = hscreen +'px';    
	}
	
	function f_GENERAL_div_lock_screen_hide(nameDiv){
	    var nomeDiv = '';
	    if(!nameDiv || nameDiv.length==0) nomeDiv = 'div_lock_screen';
	    document.getElementById(nomeDiv).style.width = 0;
	    document.getElementById(nomeDiv).style.height = 0;
	    document.getElementById(nomeDiv).style.display = 'none';
	    document.body.style.overflow='';
	}