//ESTO ES PARA PARSEARLE AL FLASH EN FORMA DINAMICA EL NOMBRE DEL XML
//COMO PARAMETRO EJEMPLO: mailing_doble_punto?data=pepito.xml
//y PARA TOMAR EL EXTPOS Y EL EXTID PARA PARSEARLE AL FLASH
//TAMBIEN LE AGREGUE EL PROMOCODE PARA NO TENER QUE EDITAR EL SCRIPT DEL FLASH
qs='';
sdata='';
spromo='';
sextid='';
sextpos='';
if (document.location.href.indexOf('?')>-1){
   if (document.location.href.indexOf('data=')>-1){
      sdata=document.location.href.substr(document.location.href.indexOf('data=')+5);
      if (sdata.indexOf('&')>-1) sdata=sdata.substring(0, sdata.indexOf('&'));
      }
   if (document.location.href.indexOf('promocode=')>-1){
      spromo=document.location.href.substr(document.location.href.indexOf('promocode=')+10);
      if (spromo.indexOf('&')>-1) spromo=spromo.substring(0, spromo.indexOf('&'));
      }	  
   if (document.location.href.indexOf('EXTPOS=')>-1){
      sextpos=document.location.href.substr(document.location.href.indexOf('EXTPOS=')+7);
      if (sextpos.indexOf('&')>-1) sextpos=sextpos.substring(0, sextpos.indexOf('&'));

      }
   if (document.location.href.indexOf('extpos=')>-1){
      sextpos=document.location.href.substr(document.location.href.indexOf('extpos=')+7);
      if (sextpos.indexOf('&')>-1) sextpos=sextpos.substring(0, sextpos.indexOf('&'));

   }
   if (document.location.href.indexOf('EXTID=')>-1){
      sextid=document.location.href.substr(document.location.href.indexOf('EXTID=')+6);
      if (sextid.indexOf('&')>-1) sextid=sextid.substring(0, sextid.indexOf('&'));

   }
   if (document.location.href.indexOf('extid=')>-1){
      sextid=document.location.href.substr(document.location.href.indexOf('extid=')+6);
      if (sextid.indexOf('&')>-1) sextid=sextid.substring(0, sextid.indexOf('&'));

   }
   if (!isNaN(sextid)) qs='?EXTPOS=' +sextpos+ '&EXTID=' +sextid;  
   if (sdata!=''){
   	   if (sextpos!='') qs=qs+'&data=' +sdata;
	   else qs='?data=' + sdata;
   }	
}
if (qs=='') qs='?data=data.xml';
if (spromo!='') qs=qs+'&promocode='+spromo;




