function kadabra(zap) {if (document.getElementById) {	var abra = document.getElementById(zap).style;	if (abra.display == "block") {		abra.display = "none";		} else {		abra.display = "block"		} 	return false	} else {	return true	}}

function re_initialize(){
	
}
function setVisibility(id, visibility) {document.all[id].style.display = visibility;} function popup(mylink, windowname){if (! window.focus)return true;var href;if (typeof(mylink) == 'string')   href=mylink;else   href=mylink.href;window.open(href, windowname, 'width=650,height=450,scrollbars=yes');return false;}//function chdiv(data, page, method, target) {		dsHistory.addFunction(function(){chdiv_ds(data, page, method, target)});    if(document.all && !window.opera) {        var aki = new ActiveXObject("Microsoft.XMLHTTP") ;        }        else {            var aki = new XMLHttpRequest();        }        var content = document.getElementById(target);		content.innerHTML = "<p align=\"center\" class=Header3><br><img src=\"./IMG/images/loading.gif\"><br><br></p>";        		if(data == 'null') {			aki.open("GET", page);		}		else {            			aki.open("GET", page+"?m=1&"+data);		}        aki.onreadystatechange = function() {        if (aki.readyState == 4 && aki.status == 200) {			content.innerHTML = aki.responseText;				//re_initialize();			}        }		aki.send(null);		/*					if(method == 'pub'){			aki.responseText.evalScripts();		}		*/}function chdiv_pp(data, page, target) {
	if(document.all && !window.opera) { var aki = new ActiveXObject("Microsoft.XMLHTTP") ; } else {  var aki = new XMLHttpRequest(); }
	var content = document.getElementById(target);
	content.innerHTML = "<p align=\"center\"><br><img src=\"./IMG/images/loading.gif\"><br><br></p>";
	if(data == 'null') { aki.open("GET", page); }
	else { aki.open("GET", page+"?p=1&"+data); }
	aki.onreadystatechange = function() {
		if (aki.readyState == 4 && aki.status == 200) {
			content.innerHTML = aki.responseText;
		}
	}
	aki.send(null);
}//function chdiv_bis(data, page, method, target) {    dsHistory.addFunction(function(){chdiv_ds(data, page, method, target)});	if(document.all && !window.opera) {        var aki = new ActiveXObject("Microsoft.XMLHTTP") ;        }        else {            var aki = new XMLHttpRequest();        }        var content = document.getElementById(target);		content.innerHTML = "";        		if(method == "GET") {            if(data == 'null') {                aki.open("GET", page);            }            else {            				aki.open("GET", page+"?m=1&"+data);            }        }        else if(method == "POST") {            akiaki.open("POST", page);        }        aki.onreadystatechange = function() {        if (aki.readyState == 4 && aki.status == 200) {			content.innerHTML = aki.responseText;			// alert(this.name);			//re_initialize();			}        }        if(method == "GET") {            aki.send(null);        }        else if(method == "POST") {            aki.setRequestHeader('Content-Type','application/x-www-form-urlencoded');         		 aki.send(data);		         }		}function chdiv_ds(data, page, method, target) {	if(document.all && !window.opera) {        var aki = new ActiveXObject("Microsoft.XMLHTTP") ;        }        else {            var aki = new XMLHttpRequest();        }        var content = document.getElementById(target);		content.innerHTML = "<p align=\"center\" class=Header3><br><img src=\"./IMG/images/loading.gif\"><br><br></p>";        		if(method == "GET") {            if(data == 'null') {                aki.open("GET", page);            }            else {            				aki.open("GET", page+"?m=1&"+data);            }        }        else if(method == "POST") {            akiaki.open("POST", page);        }        aki.onreadystatechange = function() {        if (aki.readyState == 4 && aki.status == 200) {			content.innerHTML = aki.responseText;				//re_initialize();			}        }        if(method == "GET") {            aki.send(null);        }        else if(method == "POST") {            aki.setRequestHeader('Content-Type','application/x-www-form-urlencoded');         		 aki.send(data);		         }}function chdiv_base(data, page, method, target) {	if(document.all && !window.opera) {        var aki = new ActiveXObject("Microsoft.XMLHTTP") ;        }        else {            var aki = new XMLHttpRequest();        }        var content = document.getElementById(target);		content.innerHTML = "<p align=\"center\" class=Header3><br><img src=\"./IMG/images/loading.gif\"><br><br></p>";        		if(data == 'null') {			aki.open("GET", page);		}		else {            			aki.open("GET", page+"?m=1&"+data);		}        aki.onreadystatechange = function() {        if (aki.readyState == 4 && aki.status == 200) {			content.innerHTML = aki.responseText;			}        }                aki.send(null);                }function quizz_addq(end,act){	if (end == 0){		chdiv(formData2QueryString(document.forms['addq']),'index.php','GET','q_msg'); 		chdiv(act,'index.php','GET','q_sum'); 		$('addq').reset()	} else {		chdiv(act+'&commit=1','index.php','GET','MainContent'); 	}}function quizz_delq(id,act){	chdiv(act+'&todo=del&todo_id='+id,'index.php','GET','q_sum'); 	chdiv(act,'index.php','GET','q_sum'); }function quizz_valid(){	chdiv(formData2QueryString(document.forms['myquizz']),'index.php','GET','MainContent'); }function baloon(a,b){//	document.write (a+b);}/*function chdiv2(blocpage, adress){	new Ajax.Updater(blocpage, adress + '&m=1',evalScripts=true);}*/
// javascript:alert(formData2QueryString(document.forms['cr']))function formData2QueryString(docForm)	{var submitString = '';var formElement = '';var lastElementName = '';for(i = 0 ; i < docForm.elements.length ; i++){formElement = docForm.elements[i];switch(formElement.type){case 'text' :case 'select-one' :case 'hidden' :case 'password' :case 'textarea' :submitString += formElement.name + '=' + escape(formElement.value) + '&';break;case 'radio' :if(formElement.checked){submitString += formElement.name + '=' + escape(formElement.value) + '&';}break;case 'checkbox' :if(formElement.checked){if(formElement.name = lastElementName){if(submitString.lastIndexOf('&') == submitString.length - 1){submitString = submitString.substring(0, submitString.length - 1);}submitString += ',' + paramEscape(formElement.value);}else{submitString += formElement.name + '=' + escape(formElement.value);}submitString += '&';lastElementName = formElement.name;}break;}}submitString = submitString.substring(0, submitString.length - 1);//document.all("result").value = submitString;return submitString;}