// JavaScript Document

document.write("<script id=news_script></script>");
document.write("<script id=article_script></script>");
document.write("<script id=galery_script></script>");
function setLoad(arg,obj){
if(arg==1){
	document.getElementById("topNews").innerHTML+="<br> <small>Загрузка...</small>";
	i1=setTimeout("document.getElementById('news_script').src='load_script.php?f=1';",1);
}else if(arg==2){
	document.getElementById("topArticle").innerHTML+="<br> <small>Загрузка...</small>";
	i2=setTimeout("document.getElementById('article_script').src='load_script.php?f=2';",1);
}else if(arg==3){
	document.getElementById("topGalery").innerHTML+="<br> <small>Загрузка...</small>";
	i3=setTimeout("document.getElementById('galery_script').src='load_script.php?f=3';",1);
}else if(!arg){
	i1=setTimeout("document.getElementById('news_script').src='load_script.php?f=1';",11000);
	i2=setTimeout("document.getElementById('article_script').src='load_script.php?f=2';",19000);
	i3=setTimeout("document.getElementById('galery_script').src='load_script.php?f=3';",27000);
}
}

function allCheckForm(form){
	for(i=0;i<form.elements.length;i++){
		if(form.elements[i].type=="checkbox"&&form.elements[i].checked!=true){
		form.elements[i].checked=true;}
		else{form.elements[i].checked=false;}
	}
}
/*
function fff(arg){
	if(arg==1){
		if(!confirm("Обновить графу новостей?"))clearTimeout(i1);
	}else if(arg==2){
		if(!confirm("Обновить графу статей?"))clearTimeout(i2);
	}else if(arg==3){
		if(!confirm("Обновить графу галерея?"))clearTimeout(i3);
	}else if(!arg){
		
	}
}*/
//-------------------------

setLoad();

function ReturnBodyObj(id){
	var idb=document.getElementById(id);
	return idb;
}/**/
