// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + (expires ? "; expires=" + expires : "") +
        (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    now = now.toGMTString();
    if (f.author != undefined)
       setCookie('mtcmtauth', f.author.value, now, '/', '', '');
    if (f.email != undefined)
       setCookie('mtcmtmail', f.email.value, now, '/', '', '');
    if (f.url != undefined)
       setCookie('mtcmthome', f.url.value, now, '/', '', '');
}

function forgetMe (f) {
    deleteCookie('mtcmtmail', '/', '');
    deleteCookie('mtcmthome', '/', '');
    deleteCookie('mtcmtauth', '/', '');
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}

function hideDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'none';
}

function showDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'block';
}

var commenter_name;

function individualArchivesOnLoad(commenter_name) {




    if (document.comments_form) {
        if (!commenter_name && (document.comments_form.email != undefined) &&
            (mtcmtmail = getCookie("mtcmtmail")))
            document.comments_form.email.value = mtcmtmail;
        if (!commenter_name && (document.comments_form.author != undefined) &&
            (mtcmtauth = getCookie("mtcmtauth")))
            document.comments_form.author.value = mtcmtauth;
        if (document.comments_form.url != undefined && 
            (mtcmthome = getCookie("mtcmthome")))
            document.comments_form.url.value = mtcmthome;
        if (document.comments_form["bakecookie"]) {
            if (mtcmtauth || mtcmthome) {
                document.comments_form.bakecookie.checked = true;
            } else {
                document.comments_form.bakecookie.checked = false;
            }
        }
    }
}

function writeTypeKeyGreeting(commenter_name, entry_id) {

}



function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://encicloregia.monterrey.gob.mx/imagenes/random01/01.gif"
myimages[2]="http://encicloregia.monterrey.gob.mx/imagenes/random01/02.gif"
myimages[3]="http://encicloregia.monterrey.gob.mx/imagenes/random01/03.gif"
myimages[4]="http://encicloregia.monterrey.gob.mx/imagenes/random01/04.gif"
myimages[5]="http://encicloregia.monterrey.gob.mx/imagenes/random01/05.gif"
myimages[6]="http://encicloregia.monterrey.gob.mx/imagenes/random01/06.gif"
myimages[7]="http://encicloregia.monterrey.gob.mx/imagenes/random01/07.gif"
myimages[8]="http://encicloregia.monterrey.gob.mx/imagenes/random01/08.gif"
myimages[9]="http://encicloregia.monterrey.gob.mx/imagenes/random01/09.gif"
myimages[10]="http://encicloregia.monterrey.gob.mx/imagenes/random01/10.gif"
myimages[11]="http://encicloregia.monterrey.gob.mx/imagenes/random01/11.gif"
myimages[12]="http://encicloregia.monterrey.gob.mx/imagenes/random01/12.gif"
myimages[13]="http://encicloregia.monterrey.gob.mx/imagenes/random01/13.gif"
myimages[14]="http://encicloregia.monterrey.gob.mx/imagenes/random01/14.gif"
myimages[15]="http://encicloregia.monterrey.gob.mx/imagenes/random01/15.gif"
  
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[2]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[3]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[4]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[5]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[6]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[7]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[8]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[9]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[10]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[11]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[12]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[13]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[14]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"
imagelinks[15]="http://encicloregia.monterrey.gob.mx/regiomontanos_distinguidos/"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}

function random_imglink2(){
var myimages2=new Array()
//specify random images below. You can have as many as you wish
myimages2[1]="http://encicloregia.monterrey.gob.mx/imagenes/random02/01.jpg"
myimages2[2]="http://encicloregia.monterrey.gob.mx/imagenes/random02/02.jpg"
myimages2[3]="http://encicloregia.monterrey.gob.mx/imagenes/random02/03.jpg"
myimages2[4]="http://encicloregia.monterrey.gob.mx/imagenes/random02/04.jpg"
myimages2[5]="http://encicloregia.monterrey.gob.mx/imagenes/random02/05.jpg"
myimages2[6]="http://encicloregia.monterrey.gob.mx/imagenes/random02/06.jpg"
myimages2[7]="http://encicloregia.monterrey.gob.mx/imagenes/random02/07.jpg"
myimages2[8]="http://encicloregia.monterrey.gob.mx/imagenes/random02/08.jpg"
myimages2[9]="http://encicloregia.monterrey.gob.mx/imagenes/random02/09.jpg"
myimages2[10]="http://encicloregia.monterrey.gob.mx/imagenes/random02/10.jpg"
myimages2[11]="http://encicloregia.monterrey.gob.mx/imagenes/random02/11.jpg"

  
//specify corresponding links below
var imagelinks2=new Array()
imagelinks2[1]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[2]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[3]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[4]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[5]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[6]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[7]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[8]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[9]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[10]="http://encicloregia.monterrey.gob.mx/monumentos.html"
imagelinks2[11]="http://encicloregia.monterrey.gob.mx/monumentos.html"

var ry=Math.floor(Math.random()*myimages2.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks2[ry]+'"'+'><img src="'+myimages2[ry]+'" border=0></a>')
}