function open_noticias(u,W,H,X,Y,n,b,x,m,r) {
	var cU  ='http:\/\/www.cartografinfo.com/inc/img/close_up.gif'
	var cO  ='http:\/\/www.cartografinfo.com/inc/img/close_ovr.gif'
	var cL  ='http:\/\/www.cartografinfo.com/inc/img/clock.gif'
	var mU  ='http:\/\/www.cartografinfo.com/inc/img/min_up.gif'
	var mO  ='http:\/\/www.cartografinfo.com/inc/img/min_ovr.gif'
	var xU  ='http:\/\/www.cartografinfo.com/inc/img/max_up.gif'
	var xO  ='http:\/\/www.cartografinfo.com/inc/img/max_ovr.gif'
	var rU  ='http:\/\/www.cartografinfo.com/inc/img/res_up.gif'
	var rO  ='http:\/\/www.cartografinfo.com/inc/img/res_ovr.gif'
	var tH  ='<font face=Verdana size=2 color="'+color_texto+'" weight=200><b>'+nombre_cliente+'&nbsp;:&nbsp;última hora</b></font>'
	var tW  ='&nbsp;&nbsp;Últimas noticias'
	var wB  =color_borde
	var wBs =color_borde_2
	var wBG =color_barra
	var wBGs=color_barra_2
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0'
	var fSO ='scrolling=auto noresize'
	var brd =b||1;
	var max =x||true;
	var min =m||true;
	var res =r||true;
	var tsz =20;
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}

function open_Links(u,W,H,X,Y,n,b,x,m,r) {
	var cU  ='http:\/\/www.cartografinfo.com/inc/img/close_up.gif'
	var cO  ='http:\/\/www.cartografinfo.com/inc/img/close_ovr.gif'
	var cL  ='http:\/\/www.cartografinfo.com/inc/img/clock.gif'
	var mU  ='http:\/\/www.cartografinfo.com/inc/img/min_up.gif'
	var mO  ='http:\/\/www.cartografinfo.com/inc/img/min_ovr.gif'
	var xU  ='http:\/\/www.cartografinfo.com/inc/img/max_up.gif'
	var xO  ='http:\/\/www.cartografinfo.com/inc/img/max_ovr.gif'
	var rU  ='http:\/\/www.cartografinfo.com/inc/img/res_up.gif'
	var rO  ='http:\/\/www.cartografinfo.com/inc/img/res_ovr.gif'
	var tH  ='<font face=Verdana size=2 color="'+color_texto+'" weight=200><b>'+nombre_cliente+'&nbsp;:&nbsp;Links de interes </font>'
	var tW  ='&nbsp;&nbsp;Links de interes'
	var wB  =color_borde
	var wBs =color_borde_2
	var wBG =color_barra
	var wBGs=color_barra_2
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0'
	var fSO ='scrolling=auto noresize'
	var brd =b||1;
	var max =x||true;
	var min =m||true;
	var res =r||true;
	var tsz =20;
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}

function open_productos(u,W,H,X,Y,n,b,x,m,r) {
	var cU  ='http:\/\/www.cartografinfo.com/inc/img/close_up.gif'
	var cO  ='http:\/\/www.cartografinfo.com/inc/img/close_ovr.gif'
	var cL  ='http:\/\/www.cartografinfo.com/inc/img/clock.gif'
	var mU  ='http:\/\/www.cartografinfo.com/inc/img/min_up.gif'
	var mO  ='http:\/\/www.cartografinfo.com/inc/img/min_ovr.gif'
	var xU  ='http:\/\/www.cartografinfo.com/inc/img/max_up.gif'
	var xO  ='http:\/\/www.cartografinfo.com/inc/img/max_ovr.gif'
	var rU  ='http:\/\/www.cartografinfo.com/inc/img/res_up.gif'
	var rO  ='http:\/\/www.cartografinfo.com/inc/img/res_ovr.gif'
	var tH  ='<font face=Verdana size=2 color="'+color_texto+'" weight=200><b>'+nombre_cliente+'&nbsp;:&nbsp;Catalogo de productos </font>'
	var tW  ='&nbsp;&nbsp;Catalogo de productos'
	var wB  =color_borde
	var wBs =color_borde_2
	var wBG =color_barra
	var wBGs=color_barra_2
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0'
	var fSO ='scrolling=auto noresize'
	var brd =b||1;
	var max =x||true;
	var min =m||true;
	var res =r||true;
	var tsz =20;
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}

	function envia_form() {
	
		var movie = window.document.movie;
		var clientId = movie.GetVariable("clientId");
		var nombre = movie.GetVariable("nombre");
		var apellidos1 = movie.GetVariable("apellidos1");
		var apellidos2 = movie.GetVariable("apellidos2");
		var empresa = movie.GetVariable("empresa");
		var fldAddress1 = movie.GetVariable("fldAddress1");
		var fldAddress2 = movie.GetVariable("fldAddress2");
		var fldZip = movie.GetVariable("fldZip");
		var fldCity = movie.GetVariable("fldCity");
		var telefono = movie.GetVariable("telefono");
		var email = movie.GetVariable("email");
		var motivo_contacto = movie.GetVariable("motivo_contacto");
		var fldWebAddress = movie.GetVariable("fldWebAddress");
		var fldCountry = movie.GetVariable("fldCountry");
		var fldState = movie.GetVariable("fldState");
		comunicator.location.href = "http://www.cartografinfo.com/testflash/send/sendmail.cfm?clientId="+clientId+"&nombre="+nombre+"&apellidos1="+apellidos1+"&apellidos2="+apellidos2+"&empresa="+empresa+"&fldAddress1="+fldAddress1+"&fldAddress2="+fldAddress2+"&fldZip="+fldZip+"&fldCity="+fldCity+"&telefono="+telefono+"&email="+email+"&motivo_contacto="+motivo_contacto+"&fldWebAddress="+fldWebAddress+"&fldCountry="+fldCountry+"&fldState="+fldState;
	}
		
	function SendDynamicForm (u){
		comunicator.location.href = u;
	}
	
	function envia_newsletters() {
	
		var movie = window.document.movie;
		var clientId = movie.GetVariable("clientId");
		var emailnews = movie.GetVariable("emailnews");
//		var a = /[\w\d\-\.]+@[\w\d\-]+(\.[\w\d\-]+)+/i;
//		if(emailnews.search(a) < "0"){
//			alert("Dirección de correo no válida.");
//			top.Destino.display.home.movie.TGotoLabel('/', 'contacto');
//			}
//		else{
			comunicator.location.href = "http://www.cartografinfo.com/testflash/send/sendnewsletter.cfm?clientId="+clientId+"&emailnews="+emailnews;
//			}
		}


	function noticias() {
		open_noticias('http:\/\/www.cartografinfo.com/productos/noticias.cfm?id='+numero_cliente,600,130,5,20,'dspText',1,true,true,true);
	}
	function links() {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
		leftvar = (screenX - 750) / 2 - 10
		rightvar = (screenY - 450) / 2 +70
		open_Links('http:\/\/www.cartografinfo.com/fe/index.cfm?fuseaction=home.lanzadera&fldClientId='+numero_cliente+'&fldProjectId=1',750,450,leftvar,rightvar,'dspText',1,true,true,true);

	}
	function productos() {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
		leftvar = (screenX - 750) / 2 - 10
		rightvar = (screenY - 450) / 2 +70
		open_productos('http:\/\/cartografinfo.com/productos/index.cfm?cl='+numero_cliente,750,500,leftvar,rightvar,'dspText',1,true,true,true);
	}
	function imprimir(url) {
		open_productos(url,750,600,5,20,'dspText',1,true,true,true);
	}
	
	
	function popup_picture(img, titulo,txt)
    {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+titulo+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+110);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+25);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n");
	w.document.write( "</script>\n");
	w.document.write( "<STYLE TYPE=\"text/css\"><!--a { color: 219ede; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; } a:hover{color:#FF8831; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration:none}--></STYLE>");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<img src='"+img+"' border=0 alt='"+titulo+"'><br>&nbsp;"+txt+"<br><br><center><a href='javascript:window.close();'>cerrar ventana</a></center>" );
	w.document.write( "</body></html>" );
	w.document.close();
	}
	
	function popup_flash(swf, titulo,txt,x,y)
    {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+titulo+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo("+x+"+10,"+y+"+90);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo("+x+"+10,"+y+"+90);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n");
	w.document.write( "</script>\n");
	w.document.write( "<STYLE TYPE=\"text/css\"><!--a { color: 219ede; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; } a:hover{color:#FF8831; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration:none}--></STYLE>");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"  codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"  WIDTH=\""+x+"\" HEIGHT=\""+y+"\"  id=\"movie\">");
	w.document.write( "<PARAM NAME=movie VALUE=\""+swf+"\">"); 
	 w.document.write( "<PARAM NAME=quality VALUE=high>");
 	w.document.write( "<PARAM NAME=bgcolor VALUE=#ffffff>");
 	w.document.write( "<EMBED src=\""+swf+"\" quality=high bgcolor=#ffffff WIDTH="+x+" HEIGHT="+y+" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer 	NAME=movie 	swLiveConnect=true>");
	w.document.write( "</EMBED></object><br><br><center><a href='javascript:window.close();'>cerrar ventana</a></center>");
	w.document.write( "</body></html>" );
	w.document.close();
	}
	
	
	function popup_picture_print(img, titulo)
    {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+titulo+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+50);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n");
	w.document.write( "</script>\n");
	w.document.write( "<STYLE TYPE=\"text/css\"><!--a { color: 219ede; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; } a:hover{color:#FF8831; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration:none}--></STYLE>");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<a href='javascript:window.close();'><img src='"+img+"' border=0 alt='"+titulo+"'></a>" );
	w.document.write( "<script language=\"JavaScript\">window.print();</script>");
	w.document.write( "</body></html>" );
	w.document.close();
	}
