

function popup(page,name,prefix,widthR,heightR){

	bName = navigator.appName;
	bVer = parseInt(navigator.appVersion);
	bAgent = navigator.userAgent
	ponerlo = false

	if (bName == "Microsoft Internet Explorer"){
		br = "ms";
	} else {
		br = "ns";
	}

	if (br == "ns" ||
		(br == "ms" && bAgent.indexOf("Mac") != -1)){
		ponerlo = true
	}
	if (ponerlo == true){
		page = prefix + page
	}

	window.name="Parent"

	if (!widthR == ''){
		Ancho = widthR
	} else {
		Ancho = 600
	}

	if (!heightR == ''){
		Alto = heightR
	} else {
		Alto = 400
	}

	if (widthR == 'fullpg'){
		Ancho = screen.width
	}
	if (heightR == 'fullpg'){
		Alto = screen.height
	}

	DistArriba = ((screen.height / 2) - Math.round(Alto / 2))
	DistIzq = ((screen.width / 2) - Math.round(Ancho / 2))
	params = "toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1"
	params = params + ",width="+Ancho +",height="+ Alto
	params = params + ",top=" + DistArriba + ",left=" + DistIzq + ", screenY=" + DistArriba + ", screenX=" + DistIzq
		popwindow = open(page,name,params);
		popwindow.focus();

	return false;
}