/*
activateActiveX
---------------
Purpose:  Dynamically replace any elements that will be affected by the new security feature in IE6/IE7 that requires a user to click certain types of elements to activate them before use.

Usage:  Include this file at the end of your html document using the following...
	<script language="JScript" type="text/jscript" src="activateActiveX.js"></script>
	


Since this script is in response to a software patent lawsuit, I feel it necessary to state the following...	

License:
activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available as open source code from:
http://therippa.blogspot.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html
*/


//Determine browser, we only need this for Internet Explorer
if (navigator.appName == "Microsoft Internet Explorer") {
	
	//Array of elements to be replaced
	var arrElements = new Array(3);
	arrElements[0] = "object";
	arrElements[1] = "embed";
	arrElements[2] = "applet";

	
	//Loop over element types
	for (n = 0; n < arrElements.length; n++) {
	
		//set object for brevity
		replaceObj = document.getElementsByTagName(arrElements[n]);
		
		//loop over element objects returned
		for (i = 0; i < replaceObj.length; i++ ) {
		
			//set parent object for brevity
			parentObj = replaceObj[i].parentNode;
			
			//grab the html inside of the element before removing it from the DOM
			newHTML = parentObj.innerHTML;
			
			//remove element from the DOM
			parentObj.removeChild(replaceObj[i]);
			
			//stick the element right back in, but as a new object
			parentObj.innerHTML = newHTML;
		
			}
		}
	}



function changeLngIng(){
	var urlActual = window.location.href;
	var hostActual = window.location.host;
	var ruta = urlActual.substr(urlActual.indexOf(hostActual) + hostActual.length,urlActual.length);
	
	if(ruta.toLowerCase().indexOf("/spa")!=-1){
		ruta = ruta.toLowerCase().substr(ruta.toLowerCase().indexOf("/spa") + 4,ruta.length);
	}
	window.location.href = ruta;
}
function changeLngEsp(){
	var urlActual = window.location.href;
	var hostActual = window.location.host;
	var ruta = urlActual.substr(urlActual.indexOf(hostActual) + hostActual.length,urlActual.length);
	
	ruta = "/spa" + ruta;
	
	window.location.href = ruta;
}




function generate(dep)
						{
							   var codigo = String.fromCharCode(109,97,105,108,116,111,58);
							   var codigoba = String.fromCharCode(59 + 5);
							   str =  codigo + dep + codigoba + "interactiveni.com";  
							   //alert(str);
							   window.location.href = str ;
							}
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
  document.write('<tr> ');
  document.write('  <td height="48" background="/images/backhead.gif"></td>');
  document.write('  <td width="777" height="48" valign="top" background="/images/backhead.gif"><a href="/spa/index.htm"><img src="/images/inihead.gif" width="266" height="45" border="0" align="left"></a><a href="http://www.geodesic.com" target="_blank"><img src="/../images/hd_geodesic_a1.gif" border="0" alt="Interactive Networks Inc. es una subsidiaria de Geodesic." title="Interactive Networks Inc. es una subsidiaria de Geodesic." align="right"></a></td>');
  document.write('  <td height="48" background="/images/backhead.gif">&nbsp;</td>');
document.write('  </tr>');
 document.write(' <tr> ');
 document.write('   <td background="/images/bbackhead.gif">&nbsp;</td>');
  document.write('  <td background="/images/bbackhead.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0">');
   
  
   document.write('<form style="margin:0px; padding:0px;"  id="Form1" name="Form1" method="get" runat="server" action="/GoogleSearch/Resultsp.aspx" >');
   document.write('     <tr> ');
     document.write('     <td width="102"><a id=menu1 ><img id=button1 src="/spa/images/bsolutions.gif" width="102" height="31" border="0"></a></td>');
          
		document.write('  <td width="118"><a id=menu2 ><img src="/spa/images/bcompany.gif" width="118" height="31" border="0"></a></td>');
	      document.write('   <td width="540"><table border="0" cellspacing="0" cellpadding="0" width="175"><tr><td>');
				document.write('</td> ');

			// Search Web
			document.write('<td><input name="tSearchInput" type="text" class="menu" id="searchtop"></td> ');
				        //document.write('<td><img src="/images/bsearch.gif" name="bSearch" width="52" height="16" border="0" align="absmiddle" onClick="document.Form1.submit()"></td></tr></table>');
	        document.write('<td><input name="bSearch" type="image" src="/images/bsearch.gif" width="18" height="17" border="0" align="absmiddle" style="margin-bottom:2px"></td><td><!--<a href="/inilabs/labs_home.htm"><img alt="INI Labs" title="INI Labs" src="/images/labs_news02.gif" width="62" height="16" border="0" style="padding:0 0 3px 10px; "></a>--></td><td style="padding:0px 0px 0px 240px"><a title="English" onClick="changeLngIng()"><img class="hand" src="/images/engflag.gif" width="21" height="14" border="0"></a></td><td><img src="/images/spaflag_off.gif" width="31" height="14" border="0"></td></tr></table>');
			  // document.write(' <img src="/images/bsearch.gif" width="52" height="16" border="0" align="absmiddle"></a></td>');
        
		document.write('</tr>');
      document.write(' </form>');// termina form
	  document.write('</table></td>');
    document.write('<td background="/images/bbackhead.gif">&nbsp;</td>');
  document.write('</tr>');
document.write('</table>');




//document.write('<a href="/index.htm"><img src="/images/logoiniv4.gif" width="304" height="28" border="0"></a> ');
//document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
// document.write(' <tr> ');
 // document.write('  <td background="/images/buttonback.gif">');
//	document.write('<img src="/images/base.gif" width="8" height="20" border="0">');
//	document.write('<a id=menu1 href="#"><img id=button1 src="/images/Productv4.gif" width="133" height="20" border="0"></a>');
//	document.write('<a id=menu2 href="#"><img src="/images/downv4-.gif" width="134" height="20" border="0"></a>');
//	document.write('<a id=menu3 href="#"><img src="/images/supportv4-.gif" width="157" height="20" border="0"></a>');
//	document.write('<a id=menu4 href="#"><img src="/images/companyv4.gif" width="137" height="20" border="0"></a>');
//	document.write('</td>');
 //document.write(' </tr>');
//document.write('</table>');





