var isExplorer = (navigator.appName.search("Explorer") > 0) ;

function favorite(url) {
 if (url == undefined) url= location.href;
 if (window.sidebar) {
 window.sidebar.addPanel(document.title, 'http://www.diarioz.com.ar',"");
 } else if (window.external) {
 window.external.AddFavorite('http://www.diarioz.com.ar', document.title);
 } else if (window.opera && window.print) {
 return true;
 }
}

function AbrirVentanaCentrada(theURL, winName, features, myWidth, myHeight, isCenter) { 
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features += ', left='+myLeft+', top='+myTop;
  }
  if(isExplorer){
	window.open(theURL,"",features+((features!='')?',':'')+'width='+myWidth+', height='+myHeight);
  }else{
  	window.open(theURL, winName, features+((features!='')?',':'')+'width='+myWidth+', height='+myHeight);
  }
}

function objetoAjax(){
	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 pagItem(scriptname,nropagina,qry,filter,value,order){
 var divContenido = document.getElementById('ajaxResult');
 ajax=objetoAjax();
	ajax.open("GET", scriptname+"?pag="+nropagina+"&qry="+qry+"&filter="+filter+"&value="+value+"&order="+order);
	ajax.onreadystatechange = function() {
	  if (ajax.readyState==4) {
		  divContenido.innerHTML = ajax.responseText;
	  }
	 }
	ajax.send(null);
}