function Mover(id){
	document.all('img'+id).src='/images/kube1.gif'
}

function Mout(id){
	document.all('img'+id).src='/images/but.gif'
}

function edit_info(GLOBAL_SITE_URL,FIELD,TABLE,ID){
	if (isNaN(ID))
		ID=document.all('info').value
	if (ID!='')
		a=window.open(GLOBAL_SITE_URL+'/admin/add_information.php?action=2&id='+ID+'&table='+TABLE+'&field='+FIELD,null,"height=600,width=500,status=no,toolbar=no,menubar=no,location=no");
	else
		alert("Выберите информационный блок для редактирования!")
}


function validateSearch(){
	if (document.all('srch').value!="")
		return true;
	else
		return false;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	//alert("OK")
	if (document.images ) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function show_profile(n) {
	profile = window.open('/pages/profile_item.php?id='+n, 'profile', 'directories=0,height=355,width=316,location=0,menubar=0,resizable=0,status=0,titlebar=0,toolbar=0,scrollbars=yes');
}

function change_image(str,obj) {
	objs=document.all("a_gr"+obj)
	coll=document.all.tags("A")
	for (i=0; i<coll.length; i++) 
      if (coll[i].id=="a_gr"){
	  	//alert(coll[i].parentElement.parentElement.tagName)
	  	coll[i].parentElement.parentElement.bgColor="";
		coll[i].style.textDecoration="underline"
		coll[i].style.color="#2669AE";
	}
	objs.parentElement.parentElement.bgColor="#FFFFFF";
	objs.style.textDecoration="none"
	objs.style.color="black"
	document.all.graf.src="/dynamic/course_graf.php?mode="+escape(str)
	//profile = window.open('/pages/profile_item.php?id='+n, 'profile', 'directories=0,height=355,width=316,location=0,menubar=0,resizable=0,status=0,titlebar=0,toolbar=0,scrollbars=yes');
}

// show item in command 
function show_profile(n) {
	profile = window.open('/pages/profile_item.php?id='+n, 'profile', 'directories=0,height=355,width=316,location=0,menubar=0,resizable=0,status=0,titlebar=0,toolbar=0,scrollbars=yes');
}
// show item in command 

function validate_text(name,string){
	 re = / /g;
	var msg
	msg=''
	 if (document.all(name).value=="" || document.all(name).value.replace(re,'')=="")
	    msg+="- "+string+"\n"
	 return msg
}