﻿function $(s){return document.getElementById(s);}
function $_(s){return document.getElementsByTagName(s);}
function Alto(){
    var alturaT;
    if (typeof window.innerHeight!='undefined'){
        alturaT= window.innerHeight;
    }else if(typeof document.documentElement!='undefined' && typeof document.documentElement.clientHeight!='undefined' && document.documentElement.clientHeight != 0){
        alturaT=document.documentElement.clientHeight;
    }else{
        alturaT=document.getElementsByTagName('body')[0].clientHeight;
    }
	return alturaT;
}
function Swf(s,i,w,h,bg){
	var str,id,bg;
	id=i?i:"Jardin Actual";
	bg=bg?bg:"#ffffff";
	str="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\""+w+"\" height=\""+h+"\" id=\""+id+"\" align=\"middle\">";
	str+="<param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"movie\" value=\""+s+"\" /><param name=\"loop\" value=\"false\" /><param name=\"quality\" value=\"high\" /><param name=\"scale\" value=\"noborder\" /><param name=\"bgcolor\" value=\""+bg+"\" />";
	str+="<embed loop=\"false\" scale=\"noborder\" allowFullScreen=\"true\" src=\""+s+"\" quality=\"high\" bgcolor=\""+bg+"\" width=\""+w+"\" height=\""+h+"\" name=\""+id+"\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>";
	document.write(str);
}
function ColocarSwf() {
   var sAlto=Alto()
   var sAncho=1024*(sAlto/768)
   if($('Ideatik')!=undefined) {
      $('Ideatik').height=sAlto+"px"
      $('Ideatik').width=sAncho+"px"
   }
   if($_('embed')[0]!=undefined) {
      $_('embed')[0].height=sAlto+"px"
      $_('embed')[0].width=sAncho+"px"
   }
}
window.onresize=ColocarSwf