var movieName = 'Miralejos.swf';
var movieName2 = 'Footer.swf';
 var urlAddress = "http://www.torremiralejos.com.ar.";
 var pageName = "- Torre Miralejos Necochea - Un lugar único, un concepto diferente, un buen proyecto -";
 
 function addToFavorites(){
  if (window.external){
   window.external.AddFavorite(urlAddress,pageName)
  }else{ 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
	MSDetect = "true";



function getSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  sizeRatio = myWidth / 1000;
  swfHeight = Math.round(sizeRatio * 550)
}
  function getSizeGaston() {
  swfHeightGaston = 538;
  swfWidthGaston = 960;
  }
    function getSizeGaston2() {
  swfHeightGaston2 = 100;
  swfWidthGaston2 = 960;
  }
  
function embedMiralejos(){
 myDate = new Date();
	timeString = new Array();
	timeString = myDate.toString().split(' ');
	passvar = timeString[4];
 {
	   getSizeGaston()
	   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swfWidthGaston + '" height="' + swfHeightGaston + '" id="Gaston" align="top"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + movieName + '" /><param name="quality" value="high" /><param name="salign" value="t" /><embed src="' + movieName + '" quality="high" salign="t" width="' + swfWidthGaston + '" height="' + swfHeightGaston + '" name="Gaston" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>')
   }
}
function embedFooter(){
 myDate = new Date();
	timeString = new Array();
	timeString = myDate.toString().split(' ');
	passvar = timeString[4];
 {
	   getSizeGaston2()
	   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swfWidthGaston2 + '" height="' + swfHeightGaston2 + '" id="Gaston2" align="top"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + movieName2 + '" /><param name="quality" value="high" /><param name="salign" value="t" /><embed src="' + movieName2 + '" quality="high" salign="t" width="' + swfWidthGaston2 + '" height="' + swfHeightGaston2 + '" name="Gaston2" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>')
   }
}

