function PintarFlash(aSrc,aNameObj,aWidth,aHeight){Object(aNameObj).innerHTML="<object codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+aWidth+"\" height=\""+aHeight+"\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ><param name=\"movie\" value=\""+aSrc+"\" /> <param name=\"quality\" value=\"high\" /> <embed width=\""+aWidth+"\" height=\""+aHeight+"\" src=\""+aSrc+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed></object>";}
function Object(aName){
 if(document.getElementById) 
  return document.getElementById(aName);
 else if(document.all) 
  return document.all[aName];
 else if(document.layers) 
  return document.layers[aName];}
function logoutXML() {return "<Params><Process>Logout</Process><ProcessParams></ProcessParams></Params>";}
function addToBolsa(aTipo,aWhere) {return "<Params><Process>AddToBolsa</Process><ProcessParams><Tipo>"+aTipo+"</Tipo><Id>"+aWhere+"</Id></ProcessParams></Params>";}
function removeFromBolsa(aTipo,aWhere) {return "<Params><Process>RemoveFromBolsa</Process><ProcessParams><Tipo>"+aTipo+"</Tipo><Id>"+aWhere+"</Id></ProcessParams></Params>";}
function getValueXML(aC){

 return aC;}
function getValueSC(aC){
 aC=aC.toLowerCase();
 aC.replace(/\00e1/gi,'a');
return aC;
}

function getTextFromCombo(n){
 return Object(n).options[Object(n).selectedIndex].text;}

//Obtiene el parametro MT del formulario de contacto
function gMT(){
 var lM; lM="";
 lP=window.location.search;
 if (lP!=undefined && lP!=""){
  if(lP.indexOf("?")>=0) lP=lP.replace("?","");
  larrP=lP.split("&");
  for(i=0;i<larrP.length;i++){
   if (larrP[i].split("=")[0]=="MT"){
    lM=larrP[i].split("=")[1];}}
 }
 return lM;}

//Obtiene el body del mensaje
function gB(){ 
 var lE;var lM; lM="";
 lE=Object("zForm").getElementsByTagName("input");
 if (lE!=undefined){
  for (i=0;i<lE.length;i++){
   if(lE[i].type=="text"){
    if(lM==""){
     lM=Object("lbl"+lE[i].id).innerHTML + ":" + lE[i].value;
    }else{
     lM = lM +"%0D" + Object("lbl"+lE[i].id).innerHTML + ":%20" + lE[i].value;
    }}}}

  lE=Object("zForm").getElementsByTagName("textarea");
  if (lE!=undefined){
  for (i=0;i<lE.length;i++){
    if(lM==""){
     lM=Object("lbl"+lE[i].id).innerHTML + ":" + lE[i].value;
    }else{
     lM = lM +"%0D" + Object("lbl"+lE[i].id).innerHTML + ":%20" + lE[i].value;
    }}}
 return lM;}
function wsSearch(aT, aQ){
 if (aQ){
  aQ=aQ.toLowerCase();
  window.location="http://www.williamsandoya.com/s/"+aT+"/"+aQ+'.aspx';}}
function sendMail(aMT,aA){
 var lM;
 lM=gB();
 if(aMT==""){
  lMT=gMT(); //Obtiene Mail To
  if(lMT==""){lMT="info@williamsandoya.com";}}
 lP="<mailto>"+lMT+"</mailto><subject>"+aA+"</subject><body>"+lM+"</body>";
 lP="<Params><Process>EnviarMail</Process><ProcessParams><XMLConfig>Contacto</XMLConfig><Fields></Fields><PageParams>"+lP+"</PageParams></ProcessParams></Params>";
 CallProcess("http://www.williamsandoya.com/Public/Forms/Response.aspx",lP);}