function doClick(id_banner, id_zona, codigo, referer, link_href, link_target) {
   var myScript = document.createElement("script");
   myScript.src = "http://www.yucatan.gob.mx/click.jsp?id_banner="+id_banner+"&id_zona="+id_zona+"&codigo="+codigo+"&referer="+referer+"&y="+Math.random();
   document.body.appendChild(myScript);
   document.body.removeChild(myScript);
   self.focus();
   window.open(link_href, link_target);
}

/*
Copyright (c) Copyright (c) 2007, Carl S. Yestrau All rights reserved.
Code licensed under the BSD License: http://www.featureblend.com/license.txt
Version: 1.0.3
*/
var FlashDetect=new function(){var self=this;self["installed"]=false;self["raw"]="";self["major"]=-1;self["minor"]=-1;self["revision"]=-1;self["revisionStr"]="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj["AllowScriptAccess"]="always";version=getActiveXVersion(obj);}catch(err){};return version;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj);}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version");}catch(err){};return version;};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name);}catch(err){};return obj;};var parseActiveXVersion=function(str){var versionArray=str["split"](",");return {"raw":str,"major":parseInt(versionArray[0]["split"](" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]};};var parseStandardVersion=function(str){var descParts=str["split"](/ +/);var majorMinor=descParts[2]["split"](/\./);var revisionStr=descParts[3];return {"raw":str,"major":parseInt(majorMinor[0],10),"minor":parseInt(majorMinor[1],10),"revisionStr":revisionStr,"revision":parseRevisionStrToInt(revisionStr)};};var parseRevisionStrToInt=function(str){return parseInt(str["replace"](/[a-zA-Z]/g,""),10)||self["revision"];};self["majorAtLeast"]=function(version){return self["major"]>=version;};self["FlashDetect"]=function(){if(navigator["plugins"]&&navigator["plugins"]["length"]>0){var type="application/x-shockwave-flash";var mimeTypes=navigator["mimeTypes"];if(mimeTypes&&mimeTypes[type]&&mimeTypes[type]["enabledPlugin"]&&mimeTypes[type]["enabledPlugin"]["description"]){var version=mimeTypes[type]["enabledPlugin"]["description"];var versionObj=parseStandardVersion(version);self["raw"]=versionObj["raw"];self["major"]=versionObj["major"];self["minor"]=versionObj["minor"];self["revisionStr"]=versionObj["revisionStr"];self["revision"]=versionObj["revision"];self["installed"]=true;};}else{if(navigator["appVersion"]["indexOf"]("Mac")==-1&&window["execScript"]){var version=-1;for(var i=0;i<activeXDetectRules["length"]&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i]["name"]);if(typeof obj=="object"){self["installed"]=true;version=activeXDetectRules[i]["version"](obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self["raw"]=versionObj["raw"];self["major"]=versionObj["major"];self["minor"]=versionObj["minor"];self["revision"]=versionObj["revision"];self["revisionStr"]=versionObj["revisionStr"];};};};};};}();};FlashDetect["release"]="1.0.3";

var showFlash = FlashDetect.installed;

function banner(swf,w,h,img,texto,liga) {
   var str = "";
   var _liga = "";
   if (liga!="") _liga = "</a>";
   var noFlash = "";
   if (img!="") noFlash = liga+"<img src='"+img+"' width="+w+" height="+h+" alt='"+texto+"' title='"+texto+"' border=0>"+_liga;
   else {
      noFlash = noFlash + "<div style='text-align:center;width:"+w+"px;background-color:#FFFFFF;padding:0px;border:1px solid #808080;'>";
      noFlash = noFlash + "<table cellpadding=5 cellspacing=0 style='width:"+w+"px;height:"+h+"px;'><tr><td align=center>";
      noFlash = noFlash + liga + texto + _liga;
      noFlash = noFlash + "<p><a href='http://www.macromedia.com/go/getflashplayer' target='_blank'>Descargar Flash Viewer</a></p>";
      noFlash = noFlash + "</td></tr></table>";
      noFlash = noFlash + "</div>";
   }
   if (showFlash) {
      str = str + "<div style='position:relative;width:"+w+";height:"+h+";'>";
      str = str + "<div style='position:absolute;top:0px;left:0px;z-index:1;'>"+liga+"<img src='http://www.yucatan.gob.mx/images/1.gif' alt='"+texto+"' title='"+texto+"' width="+w+" height="+h+" border=0>"+_liga+"</div>";
      str = str + "<div><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width="+w+" height="+h+">";
      str = str + "<param name='movie' value='"+swf+"'>";
      str = str + "<param name='quality' value='high'>";
      str = str + "<param name='wmode' value='transparent'>";
      str = str + "<embed src='"+swf+"' width="+w+" height="+h+" quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'></embed></object></div>";
      str = str + "</div>";
   } else str = noFlash;
   return str;
}

