// Cookie Functions
// save/read/delete cookie functions for storing small chunks of data in the browser
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

// thanks to: Jesee Chisholm <JCHISHOLM@SENSORMATIC-VPD.com>

function saveCookie(name,value, days, hours, mins, secs) {
	if (!days) days = 0;
	if (!hours) hours = 0;
	if (!mins) mins = 0;
	if (!secs) secs = 0;
	var expires = "";
	if (days+hours+mins+secs != 0) {
		var date = new Date();
		date.setTime(date.getTime()+(((days*24+hours)*60+mins)*60+secs)*1000);
		expires = "; expires="+date.toGMTString()
	}
	
	document.cookie = name+"="+value+expires+"; path=/"
}
function readCookie(name) {
	var nameEQ = name + "="
	var ca = document.cookie.split(';')
	for(var i=0;i<ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length)
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)
	}
	return null
}
function deleteCookie(name) {
	saveCookie(name,"",-1)
}




/// DATOS CNE
function cambiartitulodatoscne(texto) {
	document.getElementById('tituloDatos').innerHTML=texto;	
	window.location='#flagDatos';
}


function submitceduladatoscne() {
   submitceduladatoscnePopUp = open("http://nuevo.eluniversal.com/do/reparos/consultar?cedula=" + document.getElementById("ceduladatoscne").value,"submitceduladatoscnePopUp","width=480,height=330,scrollbars=no");
   return true;
 }
