// INICIO Abrir ModalWindow para Imagen del Día
function abreImgDia(p) {
    pqrcwindow = dhtmlmodal.open('imgdia', 'iframe', p, 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=520px,center=1,resize=0,scrolling=0')

    pqrcwindow.onclose = function() { //Define custom code to run when window is closed
    var theform = this.contentDoc.getElementById("imgdia") //Access form with id="docs" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Imagen del Día

// INICIO Abrir ModalWindow para Ingreso de Nuevo QPR
function abrePQR(){
	pqrwindow=dhtmlmodal.open('pqr', 'iframe', 'home/page_pqr_cunsulta.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=545px,height=570px,center=1,resize=0,scrolling=0')
	
	pqrwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("pqr") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
//FIN Abrir ModalWindow para Ingreso de Nuevo QPR

// INICIO Abrir ModalWindow para Consulta de QPR que hizo el Ciudadano
function abrePQRC(){
	pqrcwindow=dhtmlmodal.open('pqrc', 'iframe', 'home/page_pqr_cunsulta.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=545px,height=560px,center=1,resize=0,scrolling=0')
	
	pqrcwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("pqrc") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Consulta de QPR que hizo el Ciudadano
// INICIO Abrir ModalWindow para Contratistas ICTM
function Contratistas(){
 contwindow=dhtmlmodal.open('cont', 'iframe', 'home/page_contratistas.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=700px,height=500px,center=1,resize=0,scrolling=0')
 
 contwindow.onclose=function(){ //Define custom code to run when window is closed
 var theform=this.contentDoc.getElementById("cont"); //Access form with id="descargas" inside iframe
 return true //Allow closing of window
 }
}
// FIN Abrir ModalWindow para Contratistas ICTM
// INICIO Abrir ModalWindow para FAQs
function abreFaqs(c){
	faqswindow=dhtmlmodal.open('faqs', 'iframe', '../home/page_faqs.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')
	
	faqswindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("faqs") //Access form with id="faqs" inside iframe
	return true //Allow closing of window
	}
}

function abreFaqsPpal(c) {
    faqswindow = dhtmlmodal.open('faqs', 'iframe', 'home/page_faqs.aspx?lang=' + c, 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')

    faqswindow.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("faqs") //Access form with id="faqs" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para FAQs
// INICIO Abrir ModalWindow para HV del Director ICTM
function abreHVDir(c){
	hvdirwindow=dhtmlmodal.open('hvdir', 'iframe', 'page_hv_director.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=570px,center=1,resize=0,scrolling=0')
	
	hvdirwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("hvdir") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para HV del Director ICTM
// INICIO Abrir ModalWindow para Indicadores Gestion ICTM
function infoGestion(){
	infogeswindow=dhtmlmodal.open('infogest', 'iframe', 'page_info_gestion.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=520px,center=1,resize=0,scrolling=0')
	
	infogeswindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("infogest") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}

function infoGestion2() {
    infogeswindow = dhtmlmodal.open('infogest', 'iframe', 'instituto/page_info_gestion.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=520px,center=1,resize=0,scrolling=0')

    infogeswindow.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("infogest") //Access form with id="docs" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Indicadores Gestion ICTM

// INICIO Abrir ModalWindow para Niños
function abreNinos() {
    pqrwindow = dhtmlmodal.open('ninos', 'iframe', 'home/page_ninos.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=685px,height=505px,center=1,resize=0,scrolling=0')

    pqrwindow.onclose = function() { //Define custom code to run when window is closed
    var theform = this.contentDoc.getElementById("ninos") //Access form with id="docs" inside iframe
        return true //Allow closing of window
    }
}
//FIN Abrir ModalWindow para Niños

// INICIO Abrir ModalWindow para Organigrama
function abreOrganigrama(c){
	organiwindow=dhtmlmodal.open('organi', 'iframe', 'page_organigrama.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=585px,height=570px,center=1,resize=0,scrolling=0')
	
	organiwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("organi") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Organigrama
// INICIO Abrir ModalWindow para Documentos
function abreDocumentos(id){
	docswindow=dhtmlmodal.open('docs', 'iframe', 'page_documentos.aspx?Doc_ID='+id, 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=490px,center=1,resize=0,scrolling=0')
	
	docswindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("docs") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Documentos
// INICIO Abrir ModalWindow para Integrantes Banda
function abreInteBanda(id){
	docswindow=dhtmlmodal.open('banda', 'iframe', 'page_intebanda.aspx?Integrante_ID='+id, 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=490px,center=1,resize=0,scrolling=0')
	
	docswindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("banda") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Integrantes Banda
// INICIO Abrir ModalWindow para Documentos
function abreEventos(){
	evewindow=dhtmlmodal.open('eve', 'iframe', 'home/page_nuevoevento.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=1,scrolling=1')
	
	evewindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("eve") //Access form with id="docs" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Documentos
// INICIO Abrir ModalWindow para Documentos
function abreEventosIn() {
    evewindow = dhtmlmodal.open('eve', 'iframe', '../home/page_nuevoevento.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=1,scrolling=1')

    evewindow.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("eve") //Access form with id="docs" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Documentos
// INICIO Abrir ModalWindow Acerda De...
function infoprompt(c){
	infowindow=dhtmlmodal.open('about', 'iframe', '../home/page_acercade.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=450px,height=353px,center=1,resize=0,scrolling=0')
}

function infopromptPpal(c) {
    infowindow = dhtmlmodal.open('about', 'iframe', 'home/page_acercade.aspx?lang=' + c, 'Instituto de Cultura y Turismo de Manizales', 'width=450px,height=353px,center=1,resize=0,scrolling=0')
}
// FIN Abrir ModalWindow Acerda De...
// INICIO Metodo para validar el Ingreso de 2000 caracteres unicamente en el Mensaje del QPR
/*
Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

// INICIO Abrir ModalWindow Info Manizales
function infomanila(c){
 mzlwindow=dhtmlmodal.open('infomzl', 'iframe', '../turismo/page_info_manizales.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=550px,center=1,resize=0,scrolling=0')
 
 mzlwindow.onclose=function(){ //Define custom code to run when window is closed
 var theform=this.contentDoc.getElementById("infomzl") //Access form with id="infomzl" inside iframe
 return true //Allow closing of window
 }
}
// FIN Abrir ModalWindow Info Manizales
// INICIO Abrir ModalWindow Descargas
function abreDescargas(){
	desacargawindow=dhtmlmodal.open('descargas', 'iframe', '../home/page_descargas.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')
	
	desacargawindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("descargas") //Access form with id="descargas" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Descargas
// INICIO Abrir ModalWindow para Wallpapers
function abreWall() {
    desacargawindow = dhtmlmodal.open('descargas', 'iframe', 'home/page_descargas.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')

    desacargawindow.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("descargas") //Access form with id="descargas" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Wallpapers
// INICIO Abrir ModalWindow Punto Info Turistica
function infomanilatur(c){
 mzlturwindow=dhtmlmodal.open('infoturistica', 'iframe', '../turismo/page_puntoinfo_turismo.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=570px,height=550px,center=1,resize=0,scrolling=0')
 
 mzlturwindow.onclose=function(){ //Define custom code to run when window is closed
 var theform=this.contentDoc.getElementById("infoturistica") //Access form with id="infoturistica" inside iframe
 return true //Allow closing of window
 }
}
// FIN Abrir ModalWindow Punto Info Turistica
// INICIO Abrir ModalWindow para Arte nuestra Casa
function abreArteCasa(){
	artecasawindow=dhtmlmodal.open('artecasa', 'iframe', 'page_arte_casa.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=650px,height=500px,center=1,resize=0,scrolling=0')
	
	artecasawindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.getElementById("artecasa"); //Access form with id="descargas" inside iframe
	return true //Allow closing of window
	}
}
// FIN Abrir ModalWindow para Arte nuestra Casa
// INICIO Abrir ModalWindow para Mapa del Sitio
function abreMapaSitio(c){
 mapasitiowindow=dhtmlmodal.open('mapasitio', 'iframe', '../home/page_mapasitio.aspx?lang='+c, 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')
 
 mapasitiowindow.onclose=function(){ //Define custom code to run when window is closed
 var theform=this.contentDoc.getElementById("mapasitio"); //Access form with id="descargas" inside iframe
 return true //Allow closing of window
 }
}

function abreMapaSitioPpal(c) {
    mapasitiowindow = dhtmlmodal.open('mapasitio', 'iframe', 'home/page_mapasitio.aspx?lang=' + c, 'Instituto de Cultura y Turismo de Manizales', 'width=680px,height=500px,center=1,resize=0,scrolling=0')

    mapasitiowindow.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("mapasitio"); //Access form with id="descargas" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Mapa del Sitio

// INICIO Abrir ModalWindow para Decreto 3576
function q3576() {
    q3576window = dhtmlmodal.open('q3576', 'iframe', 'home/q3576.aspx', 'Instituto de Cultura y Turismo de Manizales', 'width=900px,height=500px,center=1,resize=0,scrolling=0')

    q3576window.onclose = function() { //Define custom code to run when window is closed
        var theform = this.contentDoc.getElementById("q3576"); //Access form with id="descargas" inside iframe
        return true //Allow closing of window
    }
}
// FIN Abrir ModalWindow para Decreto 3576


var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}

function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> Caracteres Restantes en el Limite Establecido'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}
	// FIN Metodo para validar el Ingreso de 2000 caracteres unicamente en el Mensaje del QPR