function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// JavaScript Document
function addBookmark(url, title)
{
	if (window.sidebar)
		return window.sidebar.addPanel(title, url, "");
	else if ( window.external )
		return window.external.AddFavorite( url, title);
	else if (window.opera && window.print)
		return true;
	return true;
}

function writeBookmarkLink(url, title, text, img)
{
	var insert = '';
	if (img)
		insert = writeBookmarkLinkObject(url, title, '<img src="' + img + '" alt="' + escape(text) + '" title="' + escape(text) + '" />') + '&nbsp';
	insert += writeBookmarkLinkObject(url, title, text);
	document.write(insert);
}

function writeBookmarkLinkObject(url, title, insert)
{
	if (window.sidebar || window.external)
		return ('<a href="javascript:addBookmark(\'' + escape(url) + '\', \'' + escape(title) + '\')">' + insert + '</a>');
	else if (window.opera && window.print)
		return ('<a rel="sidebar" href="' + escape(url) + '" title="' + escape(title) + '">' + insert + '</a>');
	return ('');
}


function getInternetExplorerVersion() {

    var rv = -1; // Return value assumes failure.

    if (navigator.appName == 'Microsoft Internet Explorer') {

        var ua = navigator.userAgent;

        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

        if (re.exec(ua) != null)

            rv = parseFloat(RegExp.$1);

    }

    return rv;

}

function checkVersion() {

    

    var ver = getInternetExplorerVersion();

    if (ver > -1) {

        if (ver >= 8.0)

            //alert( 'You re using a recent copy of Windows Internet Explorer.');
			return false;

        else

            //alert('You should upgrade your copy of Windows Internet Explorer.');
			document.getElementById('navegadores').style.display = 'block';

    }

    

}

function CloseUpgrade(){
	document.getElementById('navegadores').style.display = 'none';
	
}

function CloseRecomendacion(){
	document.getElementById('recomendacion').style.display = 'none';
	
}
function VerRecomendacion(){
	document.getElementById('recomendacion').style.display = 'block';
	
}

function SuggestActivate(){
	document.getElementById('search_suggest').style.display = 'block';
	
}

function SuggestDisabled(){
	document.getElementById('search_suggest').style.display = 'none';
	//alert('FUERA');
	
}

function WebMessenger(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=420');");
}

function SSL(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=555,height=456');");
}

function mascara(d,sep,pat,nums){
if(d.valant != d.value){
	val = d.value
	largo = val.length
	val = val.split(sep)
	val2 = ''
	for(r=0;r<val.length;r++){
		val2 += val[r]	
	}
	if(nums){
		for(z=0;z<val2.length;z++){
			if(isNaN(val2.charAt(z))){
				letra = new RegExp(val2.charAt(z),"g")
				val2 = val2.replace(letra,"")
			}
		}
	}
	val = ''
	val3 = new Array()
	for(s=0; s<pat.length; s++){
		val3[s] = val2.substring(0,pat[s])
		val2 = val2.substr(pat[s])
	}
	for(q=0;q<val3.length; q++){
		if(q ==0){
			val = val3[q]
		}
		else{
			if(val3[q] != ""){
				val += sep + val3[q]
				}
		}
	}
	d.value = val
	d.valant = val
	}
}

var patron2 = new Array(4,8);

function selectOn(trObject)
	{
		for(i = 0; i <= 5; i++)
		{
		trObject.childNodes[i].className = 'txtnavtn';
		}
	}
				
function selectOut(trObject)
	{
		for(i = 0; i <= 5; i++)
				trObject.childNodes[i].className = 'txtnavtn';
	}

// Funcion para las ventanas

function registro (file) {
  date = new Date();
  if (date != null) {
window.open(file,date.getTime(),"width=348,height=505,screenX=1,screenY=1,toolbar=no,scrollbars=no");
                }
            }
			
function vnt(file) {
  date = new Date();
  if (date != null) {
window.open(file,date.getTime(),"width=600,height=400,top=0,left=0,toolbar=no,scrollbars=yes,status=yes,resizable=yes");
                }
            }

function vntNav() {
  date = new Date();
  if (date != null) {
window.open("nav2006.html",date.getTime(),"width=350,height=180,top=0,left=0,toolbar=no,scrollbars=no,status=no,resizable=no");
                }
            }

function vntprint(file) {
  date = new Date();
  if (date != null) {
window.open(file,date.getTime(),"width=425,height=290,top=0,left=0,toolbar=no,scrollbars=no,status=no,resizable=no");
                }
            }
			
// Fin de funcion para las ventanas

// Impedir que copien imágenes
/*
var clickmessage="JARS Costa Rica, \nTodos los Derechos Reservados 2011.\n\nProhibida la reproducción parcial o total de este sitio\nsin previa autorización de JARS Costa Rica"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()

// Desactivar el Click Derecho
var message="JARS Costa Rica, \nTodos los Derechos Reservados 2010.\n\nProhibida la reproducción parcial o total de este sitio\nsin previa autorización de JARS Costa Rica";

function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// Funcion para links externos al Banco
function vntURL (SitioURL) {
date = new Date();
if (date != null) {
alert("IMPORTANTE: Usted esta saliendo del sitio web de JARS Costa Rica\n he ingresando al sitio: " + SitioURL);
window.open(SitioURL,date.getTime());
//window.close(-1);
	}
}


function infobarra(msg){ 
     window.status=msg; return true; 
}

<!--

//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder = "img/"; //Folder name containing the images
var ImageFileNames = new Array('bcinepolisterra.gif', 'bcinemas.gif', 'bmoliere.gif', 'bgimgym1.gif', 'bgimgym2.gif', 'bgimarena.gif', 'bcrmovies.gif', 'bmundiunas.gif', 'binbioparque.gif'); //List of images to use
var ImageURLs = new Array('https://www.jarscr.com', 'https://www.jarscr.com', 'https://www.jarscr.com', 'https://www.jarscr.com', 'https://www.jarscr.com', 'https://www.jarscr.com', 'https://www.jarscr.com', 'http://www.bncr.fi.cr/BN/promociones/proproductos.asp?c=bcaprom', 'https://www.jarscr.com'); //List of hyperlinks associated with the list of images
var DefaultURL = 'https://www.jarscr.com'; //Default hyperlink for the Banner Ad
var DisplayInterval = 7; //Number of seconds to wait before the next image is displayed
var TargetFrame = ""; //Name of the frame to open the hyperlink into

//Internal variables (do not change these unless you know what you are doing)
var IsValidBrowser = false;
var BannerAdCode = 0;
var BannerAdImages = new Array(NumberOfImages);
var DisplayInterval = DisplayInterval * 1000;
var NumberOfImages = ImageFileNames.length;

//A dd a trailing forward slash to the ImageFolder variable if it does not already have one
if (ImageFolder.substr(ImageFolder.length - 1, ImageFolder.length) != "/" && ImageFolder != "") { ImageFolder += "/";
}

if (TargetFrame == '') {
var FramesObject = null;
} else {
var FramesObject = eval('parent.' + TargetFrame);
}

//Function runs when this page has been loaded and does the following:
//1. Determine the browser name and version
// (since the script will only work on Netscape 3+ and Internet Explorer 4+).
//2. Start the timer object that will periodically change the image displayed
// by the Banner Ad.
//3. Preload the images used by the Banner Ad rotator script
function InitialiseBannerAdRotator() {

//Determine the browser name and version
//The script will only work on Netscape 3+ and Internet Explorer 4+
var BrowserType = navigator.appName;
var BrowserVersion = parseInt(navigator.appVersion);

if (BrowserType == "Netscape" && (BrowserVersion >= 3)) {
IsValidBrowser = true;
}

if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) {
IsValidBrowser = true;
}

if (IsValidBrowser) {
TimerObject = setTimeout("ChangeImage()", DisplayInterval);
BannerAdCode = 0;

for (i = 0; i < NumberOfImages; i++) {
BannerAdImages[i] = new Image();
BannerAdImages[i].src = ' ' + ImageFolder + ImageFileNames[i];
}

}

}

//Function to change the src of the Banner Ad image
function ChangeImage() {

if (IsValidBrowser) {
BannerAdCode = BannerAdCode + 1;

if (BannerAdCode == NumberOfImages) {
BannerAdCode = 0;
}

window.document.bannerad.src = BannerAdImages[BannerAdCode].src;
TimerObject = setTimeout("ChangeImage()", DisplayInterval);
}
}

//Function to redirect the browser window/frame to a new location,
//depending on which image is currently being displayed by the Banner Ad.
//If Banner Ad is being displayed on an old browser then the DefaultURL is displayed
function ChangePage() {

if (IsValidBrowser) {

if (TargetFrame != '' && (FramesObject)) {
FramesObject.location.href = ImageURLs[BannerAdCode];
} else {
document.location = ImageURLs[BannerAdCode];
}

} else if (!IsValidBrowser) {
document.location = DefaultURL;
}

}

//funcion para salir del Banco Nacional
function gotoNS12(url) {
	var confirmar = confirm("Va a abandonar el sitio de JARS Costa Rica, Desea continuar?");
	if (confirmar) {
		window.open(url,"_blank");
	}
}
*/
