function Reload (src) {
var f = document.getElementById('iframe1');
f.src = src;
}


function overTD(td,color){td.bgColor=color;}
function outTD(td,color){td.bgColor=color;}
function clickTD(td){
/*	id ="C"+td.id;	
	checkbox = document.getElementById(id);
	if(checkChanges){
		if (checkbox.checked==true)
			checkbox.checked=false;
		else
			checkbox.checked=true;
	}*/
}//td.children.tags('A')[0].click();}

function exportToExcel()
{
var oExcel = new ActiveXObject("Excel.Application");
var oBook = oExcel.Workbooks.Add;
var oSheet = oBook.Worksheets(1);
for (var y=0;y<detailsTable.rows.length;y++)
// detailsTable is the table where the content to be exported is
{
	for (var x=0;x<detailsTable.rows(y).cells.length;x++)
	{
		oSheet.Cells(y+1,x+1) =
detailsTable.rows(y).cells(x).innerText;
	}
}
oExcel.Visible = true;
oExcel.UserControl = true;
}


function toPrint()
{
  var nameDivReg="divReg";
  var nameHeader="divHeader";
  var nameDivUnreg="divUnreg";
  var elementDivReg = document.getElementById(nameDivReg);  
  var elementDivUnreg = document.getElementById(nameDivUnreg); 
  var cabecera=document.getElementById(nameHeader);   
  var ventimp = window.open('', 'popimpr');
  ventimp.document.write("<HTML><BODY><div align='center'>");
  ventimp.document.write(cabecera.innerHTML);
  ventimp.document.write("<br>");
  ventimp.document.write(elementDivReg.innerHTML);
  ventimp.document.write("<br>");
  ventimp.document.write(elementDivUnreg.innerHTML);
  ventimp.document.write("</div></BODY><HTML>");
  ventimp.document.close();
  ventimp.print();
  ventimp.close();
} 

function numeroVisitas(){
	var	requestPage='Visitas.php';
	ajax=buildAjaxObject();
	ajax.open("GET",requestPage);
	ajax.send(null);
}

function buildAjaxObject(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function mostrarVisitas(){
	//setTimeout('window.close()',10000);
    window.open("Visitas1.php" , "Visitantes" , "fullscreen=0 , toolbar=0 , location=0 , status=0 , menubar=0 , scrollbars=0 , resizable=0 , width=400 , height=150 , left=600 , top=30" , false);
	
	}
function Advertir(){
	window.open("resources/Cooperacion.html" , "" , "fullscreen=0 , toolbar=0 , location=0 , status=0 , menubar=0 , scrollbars=0 , resizable=0 , width=550 , height=450 , left=100 , top=50" , false);
   }