
function popup(url,name,width,height,resize,scroll) {
var dialogWin = new Object();
dialogWin.width = width;
dialogWin.height = height;
now = new Date();
var millis=now.getTime();
var mstr=""+millis;
if (navigator.appName == "Netscape" || navigator.appName == "") {
dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
} else if (document.all) {
dialogWin.left = (screen.width - dialogWin.width) / 2;
dialogWin.top = (screen.height - dialogWin.height) / 2;
var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
}
tienesp=false;
for (i=0; i<url.length; i++)
if (url.charAt(i)=='?')
tienesp=true;
if (tienesp)
nocach='&nocache='+mstr;
else
nocach='?nocache='+mstr;
window.open(url + nocach ,name,attr);
}

function popup3(url,width, height, resize, scroll) //popup2 nuevita
	{
	var dialogWin = new Object()
	var width = width;
	var height = height;
	var left = 100;
	var top = 100;
	var attr = 'screenX=' + left + ',screenY=' + top + ',resizable=' + resize + ',width=' + width + ',height=' + height + ',scrollbars=' + scroll + ', menubar=no, location=no, toolbar=no, status=no, directories=no';
	window.open (url, attr);
	}



function popup2(url,name,width,height,resize,scroll)  //ex popup2
	{
	var dialogWin = new Object();
	//	dialogWin.width = width;
	//	dialogWin.height = height;
		now = new Date();
	var top1 = 0;
	var left1 = 0;
	var width1 = width + 30;
	var height1 = height + 30;
	var millis=now.getTime();

	var mstr=""+millis;

	if (navigator.appName == "Netscape" || navigator.appName == "") 
	{
		//left1 = window.screenX + ((window.outerWidth - width1) / 2);
		//top1 = window.screenY + ((window.outerHeight - height1) / 2);
		left1 = 100; //para probar
		top1 = 200;

		
		var attr = 'screenX=' + left1 + ',screenY=' + top1 + ',resizable=' + resize + ',width=' + width1 + ',height=' + height1 + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	} 
	else
	{ 
		if (document.all) 
		{
			//left1 = (screen.width - width1) / 2;
			//top1 = (screen.height - height1) / 2;
			left1 = 100;
			top1 = 100;	
			var attr = 'left=' + left1 + ',top=' + top1 + ',resizable=' + resize + ',width=' + width1 + ',height=' + height1  + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
		}
	}
	tienesp=false;
	
	for (i=0; i<url.length; i++)
		if (url.charAt(i)=='?')
		tienesp=true;

	if (tienesp)
		nocach='&nocache='+mstr;
	else
		nocach='?nocache='+mstr;

	window.open(url + nocach ,name, attr);
}
