function citrix(tipo) 
{   
	var msgWindow;
	var myArgs;
	var scadena;
        
        
        myArgs = "width=700," 
                 + "height=540," 
                 + "location=0," 
                 + "menubar=0," 
                 + "resizable=0," 
                 + "scrollbars=1," 
                 + "status=0," 
                 + "titlebar=0," 
                 + "toolbar=0," 
                 + "hotkeys=0," 
                 + "screenx=0," 
                 + "screeny=0," 
                 + "left=460," 
                 + "top=0"; 
                
	msgWindow = open('', '', myArgs); 
                msgWindow.focus(); 



	//msgWindow=window.open("","displayWindow","toolbar=no, status=no, menubar=no,scrollbars=no, resizable=no, width="+iWidth+", height="+iHeight);
	

	msgWindow.document.writeln ("<head><title>Transparencia Económica</title>");

	
	msgWindow.document.writeln ("<script language=\"VBScript\">");
	msgWindow.document.writeln ("<!--");
	msgWindow.document.writeln ("option explicit");
	msgWindow.document.writeln ("dim majorver");
	msgWindow.document.writeln ("dim ua");
	msgWindow.document.writeln ("dim ie3");
	msgWindow.document.writeln ("dim ie4");
	msgWindow.document.writeln ("dim aol");
	msgWindow.document.writeln ("dim minorver4");
	msgWindow.document.writeln ("dim update");
	msgWindow.document.writeln ("dim winplat");
	msgWindow.document.writeln ("dim nav");
	msgWindow.document.writeln ("dim intButton");
	msgWindow.document.writeln ("set nav = navigator");
	msgWindow.document.writeln ("ua = \"Mozilla/2.0 (compatible; MSIE 3.02; Windows NT)\"");
	msgWindow.document.writeln ("minorver4 = \"\"");
	
	msgWindow.document.writeln ("if len(ua) >=1 then 'nav object is supported");
	msgWindow.document.writeln ("winplat = mid(ua,instr(ua,\"Windows\") + 8, 2)");
	msgWindow.document.writeln ("majorver = mid(ua,instr(ua,\"MSIE\") + 5, 1)");
	msgWindow.document.writeln ("ie3 = majorver = 3 and (winplat = \"NT\" or winplat = \"95\" or winplat = \"32\")");
	msgWindow.document.writeln ("ie4 = majorver = 4 and (winplat = \"NT\" or winplat = \"95\" or winplat = \"32\")");
	msgWindow.document.writeln ("update = instr(ua,\"Update a\")");
	msgWindow.document.writeln ("aol = instr(ua,\"AOL\")");
	msgWindow.document.writeln ("if ie4 then minorver4 = mid(ua,instr(ua,\"MSIE\") + 7, 3)");          
	msgWindow.document.writeln ("end if");
	msgWindow.document.writeln ("--></script>");
	
	
	msgWindow.document.writeln ("</head>");
	msgWindow.document.writeln ("<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
	
	
	msgWindow.document.writeln ("<table width=\"780\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	msgWindow.document.writeln ("<tr><td><a href=\"/index.php\"><img src=\"/i/comun/logo.gif\" width=\"275\" height=\"60\" alt=\"Transparencia Econ&oacute;mica -  Per&uacute;\" border=\"0\"></a></td></tr>");
	msgWindow.document.writeln ("<tr><td bgcolor=\"#FFF5D4\" height=\"5\"><img src=\"/i/trans.gif\" width=\"1\" height=\"5\"></td></tr></table>");

	
	msgWindow.document.writeln ("<!-- DIRECT.EXE EMBED -->");
	msgWindow.document.writeln ("<script language=\"JavaScript\">");
	msgWindow.document.writeln ("<!--");
	msgWindow.document.writeln ("// icaFile: location of the .ICA file for both the OBJECT and EMBED.");
	
	msgWindow.document.writeln ("var icaFile = '"+tipo+"';");
	

	msgWindow.document.writeln ("var width = 680;");
	msgWindow.document.writeln ("var height = 455;");
	msgWindow.document.writeln ("var start = \"Auto\";");
	msgWindow.document.writeln ("var border = \"On\";");
	msgWindow.document.writeln (" var hspace = 0;");
	msgWindow.document.writeln ("var vspace = 0;");
	msgWindow.document.writeln ("var cabLoc = \"http://www.citrix.com/bin/cab/wfica.cab#Version=4,2,274,317\";");
	msgWindow.document.writeln ("var plugRefLoc = \"http://www.citrix.com/demoroom/plugin.htm\";");


		

	msgWindow.document.writeln ("var activeXHTML = '<CENTER><OBJECT classid=\"clsid:238f6f83-b8b4-11cf-8771-00a024541ee3\" data=\"' + icaFile + '\" CODEBASE=\"' + cabLoc + '\" width=' + width + ' height=' + height + ' hspace=' + hspace + ' vspace=' + vspace + '> <param name=\"Start\" value=\"' + start + '\"><param name=\"Border\" value=\"' + border + '\"></OBJECT></CENTER>';");
	msgWindow.document.writeln ("var plugInHTML = '<CENTER><EMBED type=\"application/x-ica\" SRC=\"' + icaFile + '\" pluginspage=\"' + plugRefLoc + '\" width=' + width + ' height=' + height + ' start=' + start + ' border=' + border + ' hspace=' + hspace + ' vspace=' + vspace + '></CENTER>';");
		
	msgWindow.document.writeln ("var userAgent = navigator.userAgent;");
	msgWindow.document.writeln ("if (userAgent.indexOf(\"Mozilla\") != -1) {");
	msgWindow.document.writeln ("if (userAgent.indexOf(\"MSIE\") != -1) {");
	msgWindow.document.writeln ("if (userAgent.indexOf(\"Windows 3\") > 0) ");
	msgWindow.document.writeln ("{ document.write(plugInHTML); }");
	msgWindow.document.writeln ("else ");
	msgWindow.document.writeln ("{ document.write(activeXHTML); }");
	msgWindow.document.writeln ("}");
	msgWindow.document.writeln ("else");
	msgWindow.document.writeln ("{ if (userAgent.indexOf(\"Win16\") > 0) { document.write(plugInHTML); }");
	msgWindow.document.writeln ("else { document.write(plugInHTML); }");
	msgWindow.document.writeln ("}");
	msgWindow.document.writeln ("}");
	msgWindow.document.writeln ("//-->");
	msgWindow.document.writeln ("</script>");
	msgWindow.document.writeln ("<noscript> <a href=\"/Templates/Transparencia3.ica\"> Your browser does not support"); 
	msgWindow.document.writeln ("JavaScript! You'll have to click here to launch the application. </a> </noscript>"); 

	msgWindow.document.writeln ("</body>");
}

