﻿        
        /*===============================================================================================================*/
        /*cookie ref*/
        function pageLoad()
        {
 
        
        }
        /*pone el iframe de obtener el dom stat*/
        //window.onload = function()
        function carga_estad()
        {

            try{/*obtiene el ref url*/
                crea_Cookie("ref",fnGetDomain(document.referrer))

            }
            catch(Error){
                crea_Cookie("ref","")

            }

                 
               try{
                    /*requerido: <div id="ctl00_div_obt"></div>*/
                    if(getQuerystring("tst") !="")
                        document.getElementById("ctl00_div_obt").innerHTML ="<iframe width='1px' height='1px' style='display:none' scrolling='no' frameborder='0' src='http://"+document.domain +"/obt_e_dom.aspx?tst="+getQuerystring("tst") +"'></iframe>"
                    else    
                        document.getElementById("ctl00_div_obt").innerHTML ="<iframe width='1px' height='1px' style='display:none' scrolling='no' frameborder='0' src='http://"+document.domain +"/obt_e_dom.aspx'></iframe>"
                
                }
                catch(Error){}
        }
        /*obtiene un query string*/
        function getQuerystring(key, default_)
        {
          if (default_==null) default_=""; 
          key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
          var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
          var qs = regex.exec(window.location.href);
          if(qs == null)
            return default_;
          else
            return qs[1];
        }

        

        function fnGetDomain(url) {
        return (url.match(/:\/\/(.[^/]+)/)[1]).replace('www.','');
        }

     

	//crea el cook
		function crea_Cookie(name,value,days) {
	    if (days) {
		    var date = new Date();
		    date.setTime(date.getTime()+(days*24*60*60*1000));
		  
	    }
	        else var expires = "";
	        document.cookie = name+"="+value+"; path=/";
        }

        /*===============================================================================================================*/
   


function ir_a(donde)
{

     Effect.ScrollTo(donde, { duration:'0.8'});return false;

}
var timerr

function pone_demostracion()
{
        Effect.ScrollTo("demo", { duration:'0.8'});
        
        if(document.getElementById("ctl00_idioma_master_txt").innerHTML == "en")
            document.getElementById("div_flv_demo").innerHTML = "<object id='Object1' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'                                codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0'                                height='430' width='978'>                                <param name='allowScriptAccess' value='sameDomain' />                                <param name='allowFullScreen' value='false' />                                <param name='movie' value='videos_demostracion/top_demo_en.swf' />                                <param name='quality' value='high' />                                <param name='wmode' value='transparent' />                                <embed align='middle' allowfullscreen='false' allowscriptaccess='sameDomain' wmode='transparent'                                    height='430' name='top_movie' pluginspage='http://www.adobe.com/go/getflashplayer'                                    quality='high' src='videos_demostracion/top_demo_en.swf' type='application/x-shockwave-flash' width='978' />              <script type='text/javascript' src='fixit.js'></script>                  </object>"
        else
            document.getElementById("div_flv_demo").innerHTML = "<object id='Object1' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'                                codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0'                                height='430' width='978'>                                <param name='allowScriptAccess' value='sameDomain' />                                <param name='allowFullScreen' value='false' />                                <param name='movie' value='videos_demostracion/top_demo.swf' />                                <param name='quality' value='high' />                                <param name='wmode' value='transparent' />                                <embed align='middle' allowfullscreen='false' allowscriptaccess='sameDomain' wmode='transparent'                                    height='430' name='top_movie' pluginspage='http://www.adobe.com/go/getflashplayer'                                    quality='high' src='videos_demostracion/top_demo.swf' type='application/x-shockwave-flash' width='978' />                        <script type='text/javascript' src='fixit.js'></script>        </object>"
        
        Effect.BlindUp(document.getElementById("ctl00_div_flv_ini"), { duration:'1'});
        Effect.BlindDown(document.getElementById("div_flv_demo"), { duration:'1.4'});
        timerr = setTimeout("quita_flv_ini()",1000)
        //pone la imagen de cerrar el demo
        Effect.BlindDown(document.getElementById("ctl00_cerrar_demo"))
        return false;
}



function cerrar_demo()
{

        Effect.ScrollTo("inicio", { duration:'0.8'});
     //pone el flash de inicio
     
        if(document.getElementById("ctl00_idioma_master_txt").innerHTML == "en")
            document.getElementById("ctl00_div_flv_ini").innerHTML = " <object id='top_movie' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'                                codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0'                                height='299' width='978'>                                <param name='allowScriptAccess' value='sameDomain' />                                <param name='allowFullScreen' value='false' />                                <param name='movie' value='top_movie/top_movie_en.swf' />                                <param name='quality' value='high' />                                <param name='wmode' value='transparent' />                                <embed align='middle' allowfullscreen='false' allowscriptaccess='sameDomain' wmode='transparent'                                    height='299' name='top_movie' pluginspage='http://www.adobe.com/go/getflashplayer'                                    quality='high' src='top_movie/top_movie_en.swf' type='application/x-shockwave-flash' width='978' />                      <script type='text/javascript' src='fixit.js'></script>          </object>"
        else
            document.getElementById("ctl00_div_flv_ini").innerHTML = " <object id='top_movie' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'                                codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0'                                height='299' width='978'>                                <param name='allowScriptAccess' value='sameDomain' />                                <param name='allowFullScreen' value='false' />                                <param name='movie' value='top_movie/top_movie.swf' />                                <param name='quality' value='high' />                                <param name='wmode' value='transparent' />                                <embed align='middle' allowfullscreen='false' allowscriptaccess='sameDomain' wmode='transparent'                                    height='299' name='top_movie' pluginspage='http://www.adobe.com/go/getflashplayer'                                    quality='high' src='top_movie/top_movie.swf' type='application/x-shockwave-flash' width='978' />                          <script type='text/javascript' src='fixit.js'></script>      </object>"
    
        Effect.BlindUp(document.getElementById("div_flv_demo"), { duration:'1'});
        Effect.BlindDown(document.getElementById("ctl00_div_flv_ini"), { duration:'1.4'});
        //quita la imagen de cerrar el demo
        Effect.BlindUp(document.getElementById("ctl00_cerrar_demo"))
        
        timerr = setTimeout("quita_flv_demo()",1000)
}

function quita_flv_demo()
{
    //limpia el timer
    clearTimeout(timerr)
    //quita el demo
     document.getElementById("div_flv_demo").innerHTML = ""
    
}

function quita_flv_ini()
{
    //limpia el timer
    clearTimeout(timerr)
    //quita el  flash de inicio
    document.getElementById("ctl00_div_flv_ini").innerHTML = ""
      
}
