function mi_banco_pop_up_absolute(file) 
{
	var warning_file_path = 'http://www.todo1.com/misc/';
	var warning_file_name = file;
	var warning_file_url = warning_file_path + file;
	settings = 'height=402,width=404,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,'
	if ((navigator.appName == "Netscape")) {
		settings += 'screenX=300,screenY=200'
	} else {
		settings += 'left=300,top=200'
	}
        window.open(warning_file_url,'bank',settings)
}

function BancaElectPer() {
	window.open('http://www.pichincha.com/salto.html', 'bank','status=yes,menubar=no,scrollbars=yes,resizable=yes');
}

function OLBPCommerce()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name : OLBPCommerce
//
// Description:
//	Opens a new window where the user is taken to the Online Banking Application for Commerce Bank. 
//
// Inputs:
//	None
//
// Outputs:
//	None
//
// Assumptions/Comments:
//	None
//
// History:
//
//	Date			Developer			Description
// -----------------------------------------------------------------------------------------------------
//	05-16-2003		Maria Cruz		Initial implementation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
	window.open('https://commercebank.olb.todo1.com/servlet/msfv/BMNBMUS33/Login/loginFrame.htm',
'bank','status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes');
}


function mi_banco_pop_up(file) 
{
	var warning_file_path = '/misc/';
	var warning_file_name = file;
	var warning_file_url = warning_file_path + file;
	settings = 'height=402,width=404,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,'
	if ((navigator.appName == "Netscape")) {
		settings += 'screenX=300,screenY=200'
	} else {
		settings += 'left=300,top=200'
	}
        window.open(warning_file_url,'bank',settings)
}
function openWindow(newURL,country,chi,elem,W,H) {
	var path = newURL;
	if (path=='1') {
		path = '/NASApp/cs/ContentServer?pagename=Personas/index&pais=' + country + '&chi=' + chi + '';
	}
	else if (path=='2') {
		path = '/NASApp/cs/ContentServer?pagename=Personas/' + elem + '';
	}
	settings = 'height=' + H + ',width=' + W + ',toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no,'
	if ((navigator.appName == "Netscape")) {
		settings += 'screenX=300,screenY=200'
	} else {
		settings += 'left=300,top=200'
	}
	window.open(path,'pop',settings)
}


function fr(loc,country,chi) 
{
	//This code was added to make the anchor work.
	//changes were made by AGomez
	var offset;
	var newloc;
	var myanchor;
		
	if(loc.match("anch")!= null){
		offset = loc.indexOf("anch");
		newloc = loc.slice(0, offset-1);
		myanchor = loc.slice(offset-1);
		
	}else{
		newloc = loc;
		myanchor= "";
	}
	//end of changes
	
	var chan;
	if (chi=="o" && country=="c") { chan = "mi_consumoco"; }
	else if (chi=="o" && country=="v") { chan = "mi_consumove"; }
	else if (chi=="o" && country=="e") { chan = "mi_consumoec"; }
	else if (chi=="ca" && country=="c") { chan = "mi_casaco"; }
	else if (chi=="ca" && country=="v") { chan = "mi_casave"; }
	else if (chi=="ca" && country=="e") { chan = "mi_casaec"; }
	else if (chi=="r" && country=="c") { chan = "mi_transporteco"; }
	else if (chi=="r" && country=="v") { chan = "mi_transporteve"; }
	else if (chi=="r" && country=="e") { chan = "mi_transporteec"; }
	else if (chi=="tl" && country=="c") { chan = "mi_tiempoco"; }
	else if (chi=="tl" && country=="v") { chan = "mi_tiempove"; }
	else if (chi=="tl" && country=="e") { chan = "mi_tiempoec"; }
	else if (chi=="h") { chan = "herramientas"; }
	else if (chi=="b" && country=="v") { chan = "mi_bancove"; }
	else if (chi=="b" && country=="e") { chan = "mi_bancoec"; }
	else if (chi=="b" && country=="c") { chan = "mi_bancoco"; }
	else if (chi=="ic") { chan = "inversionesco"; }
	else if (chi=="iv") { chan = "inversionesve"; }
	else if (chi=="ie") { chan = "inversionesec"; }
	else if (chi=="e" && country=="c") { chan = "mi_educacionco"; }	
	else if (chi=="e" && country=="v") { chan = "mi_educacionve"; }	
	else if (chi=="e" && country=="e") { chan = "mi_educacionec"; }
	else if (chi=="s" && country=="c") { chan = "mi_saludco"; }	
	else if (chi=="s" && country=="v") { chan = "mi_saludve"; }	
	else if (chi=="s" && country=="e") { chan = "mi_saludec"; }
	else if (chi=="rr" && country=="c") { chan = "mi_retiroco"; }
	else if (chi=="rr" && country=="e") { chan = "mi_retiroec"; }
	else if (chi=="rr" && country=="v") { chan = "mi_retirove"; }
	else { chan = "common"; }
	var pais;
	if (country=="c") { pais = "co"; }
	else if (country=="v") { pais = "ve"; }
	else if (country=="e") { pais = "ec"; }
	else { pais = "co"; }
	
	var new_loc;
	if(loc.match("anch")!= null){
		new_loc = "/NASApp/cs/ContentServer?pais=" + pais +
				"&pagename=Personas/frameset&link=" + newloc + "&chi=" + chan + myanchor + "";
	}
	else{
		new_loc = "/NASApp/cs/ContentServer?pais=" + pais +
				"&pagename=Personas/frameset&link=" + loc + "&chi=" + chan + "";
	
	}

	window.document.location = new_loc;
}

function openPopup(strURL, iWidth, iHeight, strScrollbars, strToolbar, strMenubar, 
					strResizable, strStatus, strLocation, strDirectories) 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name : openPopup
//
// Description:
// Outputs:
//	None
//
// Assumptions/Comments:
//	None
//
// History:
//
//	Date			Developer			Description
// -----------------------------------------------------------------------------------------------------
//	12-02-2002		Maria Cruz		Initial implementation.
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
	settings = "height=" + iHeight + ",width=" + iWidth + ",toolbar=" + strToolbar + ",menubar=" + strMenubar + ",scrollbars=" + strScrollbars + ",resizable=" + strResizable + ",location=" + strLocation + ",directories=" + strDirectories + ",status=" + strStatus + ",";
	
	if ((navigator.appName == "Netscape")) 
	{
		settings += "screenX=300,screenY=200";
	} 
	else 
	{
		settings += "left=300,top=200";
	}
	
	window.open(strURL, "pop", settings);
}

function linkBOLCo()
{
	window.open('https://bancolombia.olb.todo1.com/servlet/msfv/B0007/Login/loginFrame.htm','bank','status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes');
	window.close();
}

function openPopupMain(strURL, iWidth, iHeight, strScrollbars, strToolbar, strMenubar, 
					strResizable, strStatus, strLocation, strDirectories, iposition) 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name : openPopup
//
// Description:
//
// Inputs:
//	strURL: the URL to open in a popup window.
//	iWidth: the width of the popup window
//	iHeight: the width of the popup window
//	strScrollbars: whether to display scrollbars or not.  Valid values are 'yes' and 'no'.
//	strToolbar: whether to display the toolbar or not.  Valid values are 'yes' and 'no'.
//	strMenubar: whether to display the menubar or not.  Valid values are 'yes' and 'no'.
//	strResizable: whether to display make the window resizable or not.  Valid values are 'yes' and 'no'.
//	strLocation: whether to display the location or not.  Valid values are 'yes' and 'no'.
//	strDirectories: whether to display the directories or not.  Valid values are 'yes' and 'no'.
//  iposition: the position of the new window in the browser 1=upperleft, 2=upperright, 3=bottomleft, 4=bottomrigth, 5=middle
//
// Outputs:
//	None
//
// Assumptions/Comments:
//	None
//
// History:
//
//	Date			Developer			Description
// -----------------------------------------------------------------------------------------------------
//	12-10-2002		Maria Cruz		Initial implementation.
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
    var winx = (screen.width - iWidth) / 2;
    var winy = (screen.height - iHeight) / 2;
	var positionx = (screen.width - iWidth) - 30;
	var positiony = (screen.height - iHeight) - 60;

	settings = "height=" + iHeight + ",width=" + iWidth + ",toolbar=" + strToolbar + ",menubar=" + strMenubar + ",scrollbars=" + strScrollbars + ",resizable=" + strResizable + ",location=" + strLocation + ",directories=" + strDirectories + ",status=" + strStatus + ",";
	
	if ((navigator.appName == "Netscape")) 
	{
		if(iposition == 1)

		{
			settings += "screenX=0,screenY=0";
		}
		else if(iposition == 2)
		{
			settings += "screenX="+positionx+",screenY=0";
		}
		else if(iposition == 3)
		{
			settings += "screenX=0,screenY="+positiony;
		}
		else if(iposition == 4)
		{
			settings += "screenX="+positionx+",screenY="+positiony;
		}
	    else
		{
			settings += "screenX="+winx+",screenY="+winy;
		}
	} 
	else 
	{
		if(iposition == 1)
		{
			settings += "left=0,top=0";
		}
		else if(iposition == 2)
		{
			settings += "left="+positionx+",top=0";
		}
		else if(iposition == 3)
		{
			settings += "left=0,top="+positiony;
		}
		else if(iposition == 4)
		{
			settings += "left="+positionx+",top="+positiony;
		}
	    else
		{
			settings += "left="+winx+",top="+winy;
		}
	}
	
	window.open(strURL, "pop", settings);
}
	
