﻿function initBannerX() {

    var elms = document.getElementsByTagName('a');
    for (i = 0; i < elms.length; i++) {
        if (elms[i].className.indexOf("bannerX") == 0) {
           
            elms[i].onclick =  function() {
                var id_banner = 0;
                params = this.className.split('-');
                if (params.length == 2) {
                    id_banner = parseInt(params[1]);
                    registra_click(id_banner);
                }
            };
        }
    }

}

addEvent(window, "load", initBannerX);
function registra_click(id) {
   
    var d = new Date();
    $.get("registra_click.aspx?d="+d, {"id_banner":id}, function(data) { });
    return false;
}

var gDefaultPage2 = "http://localhost/mitiempo/home.aspx";
function registra_hint() {
   if(document.URL!=gDefaultPage2){
   //alert('registro_hint');
   // var d = new Date();
    //$.get("home.aspx?d="+d, {"hint":1}, function(data) { });
    
    
    var theBody2 = document.getElementsByTagName('BODY')[0];
	
	var popcont2 = document.createElement('div');
	popcont2.id = 'hintContainer';
	popcont2.innerHTML = '' +
		'<div id="hintInner" >' +
		
			    '<iframe src="'+ gDefaultPage2 +'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="hintFrame" name="hintFrame" width="100%" height="100%"></iframe>' +
			    
		'</div>';
	
	theBody2.appendChild(popcont2);
	
	
	gPopupContainer2 = document.getElementById("hintContainer");
//	gPopFrame2 = document.getElementById("hintFrame");	
//	
	
//		
//	gPopupContainer2.style.display = "block";
//	gPopFrame2.style.display='';

gPopupContainer2.style.width =  "0px";
		gPopupContainer2.style.height ="0px";
		
		}
    return false;
}

