var PLPath = "../";
function $(ID) {return document.getElementById(ID);}
var isIE = (document.all && window.ActiveXObject && !window.opera) ? true : false;
var isChrome = navigator.userAgent.indexOf('Chrome') != -1;
var DMURL = document.location.protocol+'//'+location.hostname+(location.port ? ':'+location.port : '')+'/';
var AJPath = PLPath+'ajax.php';
if(isIE) try {document.execCommand("BackgroundImageCache", false, true);} catch(e) {}
var xmlHttp;
var Try = {
	these: function() {
		var returnValue;
		for (var i = 0; i < arguments.length; i++) {var lambda = arguments[i]; try {returnValue = lambda(); break;} catch (e) {}}
		return returnValue;
	}
}
function makeRequest(queryString, php, func, method) {
	xmlHttp = Try.these(
		function() {return new XMLHttpRequest()},
		function() {return new ActiveXObject('Msxml2.XMLHTTP')},
		function() {return new ActiveXObject('Microsoft.XMLHTTP')}
	);	
	method = (typeof method == 'undefined') ? 'post' : 'get';
	if(func) xmlHttp.onreadystatechange = eval(func);
	xmlHttp.open(method, method == 'post' ? php : php+'?'+queryString, true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.send(method == 'post' ? queryString : null);
}
function class_tab(ID,name) { 
$(ID).className = name;
}
function msg(take,id,r){
	  $(id).innerHTML ='<div class="'+r+'">'+take+'</div>';
	  window.setTimeout(function(){$(id).innerHTML = '';}, 5000);
}
function cin(ID,allid){
 for(var i=1;i<=allid;i++){
		if(ID==i){
			$('c_'+i).style.display="block"; 
		}else{
			$('c_'+i).style.display="none";
		}
	
	
}
}
function csstb(ID,allid,css){
	for(var i=1;i<=allid;i++){
		if(ID==i){
			$(i).className = css;
		}else{
			$(i).className = '';
		}
	
	
}
	
}