	
//incrustar mapes 

function add_map(url,root_map,width,height)
{

 if(navigator.appName=="Microsoft Internet Explorer")
    {
       var text="<iframe src=\""+url+"\" width=\""+width+"\" height=\""+height+"\"  frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" >"+"</iframe>";    
    
    } else { 
       var text="<object data=\""+url+"\" width=\""+width+"\" height=\""+height+"\">"+"</object>"; 
    }
    $(root_map).update(text);  
}


function loadMaps()
{

    var maps=$$('.urlmap');   
    
    if ($('map-width')!=null && $('map-height')!=null)
    {
        var width=$F('map-width');
        var height=$F('map-height'); 
    }

    for (i=0; i<maps.length;i++)
    {
        add_map(maps[i].value,'root_map_'+maps[i].id.substring(8),width,height);    
    }
}

//incrustar videos

function add_video(url,root_video,width,height){ 

 if(navigator.appName=="Microsoft Internet Explorer")
    {
        var text="<embed src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" autoplay=\"false\" wmode=\"transparent\">"
        +"<param name=\"cache\" value=\"true\">"
        +"<param name=\"type\" value=\"video/quicktime\">"
        +"<param name=\"bgcolor\" value=\"#FFFFFF\">"
        +"<param name=\"controller\" value=\"true\">"
        +"<param name=\"showcontrols\" value=\"1\"/>"
        +"<param name=\"enablejavascript\" value=\"TRUE\">"
        +"<param name=\"showdisplay\" value=\"1\">"
        +"<param name=\"wmode\" value=\"transparent\"/>"
        +"<param name=\"qtnext1\" value=\"javascript:GAMIndexAds.endMovie(GAMIndexAds.oCurrentMovie);\">"
        +"</embed>";
    
    } else {
        var text="<object width=\""+width+"\" height=\""+height+"\">"
            +"<param name=\"movie\" value=\""+url+"\"/>"
            +"<param name=\"wmode\" value=\"transparent\"/>"
            +"<embed src=\""+url+"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\""+width+"\" height=\""+height+"\"/>"
            +"</object>";
    }
    $(root_video).update(text);
}


function loadVideos()
{

    var videos=$$('.urlvideo');
    if ($('video-width')!=null && $('video-height')!=null)
    {
        var width=$F('video-width');
        var height=$F('video-height');
    }

    for (i=0; i<videos.length;i++)
    {
        add_video(videos[i].value,'root_video_'+videos[i].id.substring(10),width,height);
    }
}


function addEvent(obj, evType, fn){ 
    if (obj.addEventListener){ 
            obj.addEventListener(evType, fn, false); 
            return true; 
            } else if (obj.attachEvent){ 
            var r = obj.attachEvent("on"+evType, fn); 
            return r; 
            } else { 
            return false; 
        } 
}

function load(){ 
    addEvent(window, 'load', loadVideos);
    addEvent(window, 'load', loadMaps);
}
    
load() 



