function getAjaxResponse(file,vars,data,e) {
/*
var y=getOffsetTop(e);
var x=getOffsetLeft(e);
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=y+"px";
document.getElementById('ajaxloading').style.left=x+"px";*/
document.getElementById('ajaxloading').style.display="block";

  if (window.XMLHttpRequest) {              
    var AJAX=new XMLHttpRequest();              
  } else {                                  
   var AJAX=new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (AJAX) {
	 var v=vars.split("@");
	 var d=data.split("@");
	 var url = "page/"+file+".php?";
	 for(var i=0;i<v.length;i++) 
	 {
		url+=v[i]+"="+d[i]+"&";
	 }
     AJAX.open("GET", url, false);                             
     AJAX.send(null);
	 document.getElementById('ajaxloading').style.display="none";
     return AJAX.responseText;
  } else {
     document.getElementById('ajaxloading').style.display="none";
     return false;
  }
}

function getAjax(file,vars,data) {
/*
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=scrollTop+"px";*/
document.getElementById('ajaxloading').style.display="block";

  if (window.XMLHttpRequest) {              
    var AJAX=new XMLHttpRequest();              
  } else {                                  
   var AJAX=new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (AJAX) {
	 var v=vars.split("@");
	 var d=data.split("@");
	 var url = "page/"+file+".php?";
	 for(var i=0;i<v.length;i++) 
	 {
		url+=v[i]+"="+d[i]+"&";
	 }
     AJAX.open("GET", url, false);                             
     AJAX.send(null);
	 document.getElementById('ajaxloading').style.display="none";
     return AJAX.responseText;
  } else {
     document.getElementById('ajaxloading').style.display="none";
     return false;
  }
}

function run_get_sync(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.

//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = document.getElementById(objID);
/*
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=scrollTop+"px";*/
document.getElementById('ajaxloading').style.display="block";
xmlhttp.open("GET", serverPage+'sg1='+getAjax('securex','',''),false);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=" ";
	document.getElementById('ajaxloading').style.display="none";
	eval(xmlhttp.responseText);
}
}
xmlhttp.send(null);
}

function run_get(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.



//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = document.getElementById(objID);
/*
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=scrollTop+"px";*/
document.getElementById('ajaxloading').style.display="block";
xmlhttp.open("GET", serverPage+'sg1='+getAjax('securex','',''));
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=" ";
	document.getElementById('ajaxloading').style.display="none";
	eval(xmlhttp.responseText);
}
}
xmlhttp.send(null);
}


function get_noexec_sync(file, vars, data, responsediv)
{
  if (window.XMLHttpRequest) {              
    AJAX=new XMLHttpRequest();              
  } else {                                  
    AJAX=new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (AJAX) {
	 url
	 var v=vars.split("@");
	 var d=data.split("@");
	 var url = "page/"+file+".php?";
	 for(var i=0;i<v.length;i++) 
	 {
		url+=v[i]+"="+d[i]+"&";
	 }
     AJAX.open("GET", url, false);                             
     AJAX.send(null);
     document.getElementById(responsediv).innerHTML=AJAX.responseText;                                         
  } else {
     return false;
  }                                             
}


function run_get_noexec(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.






//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage+'sg1='+getAjax('securex','',''), true);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send(null);
}

function run_get_noexec_popup(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.






//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = parent.getElementById(objID);
xmlhttp.open("GET", serverPage+'sg1='+getAjax('securex','',''));
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send(null);
}


function run_post(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.






var objID = responsediv;
var obj = document.getElementById(objID);
/*
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=scrollTop+"px";*/
document.getElementById('ajaxloading').style.display="block";
var f=fields.split("@");
var v=vars.split("@");
var params="";
var serverPage = "page/"+filename+".php";
for(var i=0;i<f.length;i++) 
{
params+=f[i]+"="+v[i]+"&";
}
xmlhttp.open("POST", serverPage);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=" ";
	document.getElementById('ajaxloading').style.display="none";
	eval(xmlhttp.responseText);
}
}
xmlhttp.send(params+'sg1='+getAjax('securex','','')); 
}


function run_post_noexec(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.







var objID = responsediv;
var obj = document.getElementById(objID);
var f=fields.split("@");
var v=vars.split("@");
var params="";
var serverPage = "page/"+filename+".php";
for(var i=0;i<f.length;i++) 
{
params+=f[i]+"="+v[i]+"&";
}
//obj.innerHTML="<div id='ajaxloading2'>Se incarca...</div><br />";
xmlhttp.open("POST", serverPage);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send(params+'sg1='+getAjax('securex','','')); 
}

function run_get_cl(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.





//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = document.getElementById(objID);
/*
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
document.getElementById('ajaxloading').style.top=scrollTop+"px";*/
document.getElementById('ajaxloading').style.display="block";
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	document.getElementById('ajaxloading').style.display="none";
	eval(xmlhttp.responseText);
}
}
xmlhttp.send(null);
}


function ajaxmsg(msg)
{
	var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
	var instanta=document.getElementById('ajaxmsg');
	if(instanta==null) {
	sdiv=document.createElement('div');
	scontent=document.createElement('div');
	scontent.setAttribute('id','ajaxmsgcontent');
	scontent.innerHTML='<br /><br />';
	var att="top: "+scrollTop+"px; left:0px";
	sdiv.setAttribute('id','ajaxmsg');
	sdiv.setAttribute('class','ajaxres');
	sdiv.setAttribute('className','ajaxres');
	sdiv.setAttribute('style','overflow: auto; '+att);
	sdiv.style.opacity = 0;
	scontent.innerHTML=msg;
	sdiv.appendChild(scontent);
	document.body.appendChild(sdiv);
	opacity('ajaxmsg', 0, 100, 300);
	setTimeout("opacity('ajaxmsg', 100, 25, 400);",300);
	setTimeout("opacity('ajaxmsg', 25, 70, 300);",710);
	setTimeout("opacity('ajaxmsg', 100, 0, 1000);",4500);
	setTimeout('document.body.removeChild(document.getElementById(\'ajaxmsg\'));', 5600);
	}
}

function run_get_noexeccl(filename, fields, vars, responsediv) {
var xmlhttp = false;
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.

//The location we are loading the page into.
var objID = responsediv;
var f=fields.split("@");
var v=vars.split("@");
var serverPage = "../page/"+filename+".php?";
for(var i=0;i<f.length;i++) 
{
serverPage+=f[i]+"="+v[i]+"&";
}
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	obj.innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send(null);
}