if(window.innerWidth!=undefined){
    var wWidth = window.innerWidth;
    var wHeight = window.innerHeight;
}else{
    var D = document.documentElement;
    if(D){ 
        var wWidth = D.clientWidth;
        var wHeight = D.clientHeight;
    }
}

window.onresize = resize;

function resize() {
    if(window.innerWidth!=undefined){
        var wWidth = window.innerWidth;
        var wHeight = window.innerHeight;
    }else{
        var D = document.documentElement;
        if(D){ 
            var wWidth = D.clientWidth;
            var wHeight = D.clientHeight;
        }
    }
}


function getScrollWidth()
{
   var w = window.pageXOffset ||
           document.documentElement.scrollLeft;
  // document.body.scrollLeft ||         
   return w ? w : 0;
} 




function img_swf_DoFSCommand(command, args){ 
    
    if(command=="quit"){
        document.getElementById('imgSwf').style.visibility='hidden';
        document.getElementById('imgSwfCont').style.visibility='hidden';
        
    }
}

function mostrarImagen(urlImage){  
    var de = document.documentElement;
    
    var wWidth2 =  wWidth - 50; 
    var wHeight2 = wHeight -30;
    var D = document.getElementById('imgSwfCont');
    
    
    D.style.width= wWidth2+"px";
    D.style.height= wHeight2+"px";
    
    
    D.style.left = ((wWidth - wWidth2)/2)+"px";
    D.style.top = (((wHeight - wHeight2)/2))+"px"; // de.scrollTop+ 
      
    
    var params = {
      allowScriptAccess: 'always'
    };
    var flashvars = {
      urlImagen: urlImage
    };

    swfobject.embedSWF("swf/img.swf", "imgSwf",  D.style.width, D.style.height, "9.0.0", "swf/expressInstall.swf",{urlImagen: urlImage},{allowScriptAccess: 'always', name: 'img_swf',wmode: 'transparent'});
    
    
	
	document.getElementById('imgSwfCont').style.visibility='visible';
    
   
}
