<!--
var h1='';
var shutle=''
var direction=1;

function putaj(fname){
	var fr=document.createElement('iframe');
	var content = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>";
	content1="<form name=upd method=post action='/upd.php'><input type=hidden name=act value=''><input type=hidden name=passed value=''></form>";
	content += '</head>\n<body id=wsw>'+content1+'</body>\n</html>';

	fr.src='javascript:false;';
	fr.name=fname;
	fr.id=fname;
	fr.style.position='absolute';
	fr.style.display='none';
	fr.style.margin=fr.style.padding='0px';
	fr.style.zIndex=1;
	fr.style.width=fr.style.height='0px';
	document.getElementsByTagName('body')[0].appendChild(fr);
	frm = document.getElementById (fname);
	frm.src='/init.htm';
}

function setvalue(name,value){
	var obj = document.getElementById ? document.getElementById(name) : null;
	obj.innerHTML = value;
	resetAj();
}

function getContent(){
	h1 = document.getElementById ? document.getElementById("webhed") : null;
	shutle = document.getElementById ? document.getElementById("tip100") : null;
	launchShutle(shutle);
	var divs = document.getElementsByTagName("div");
	for (var i=0; i<divs.length; i++){
		var div = divs[i];

		if (div.getAttribute("rel") == "contner"){
			var thisID = div.getAttribute("id");	
			getContentAj(thisID,'getcont');
		} else if (div.getAttribute("rel") == "tip")
		{
		   var thisID = div.getAttribute("id");
		   div.onmouseover = function () {reactTip(this); return false;}
		}
	}
}

function getContentAj(thisID,act){
	var obj = document.getElementById ? document.getElementById("ajaxObj") : null;
	obj.src = '/upd.php?act='+act+'&contid='+thisID+'&ts='+Math.random();

}

function chUp(action,formname,holder){ 	
	process(holder);
	var objScript = document.getElementById ? document.getElementById("eBuilder") : null;
	var reqLine='';
	var currform	=	eval("document."+formname);
	for(var i=0;i<currform.length;i++){
		reqLine+=currform[i].name+"="+escape(currform[i].value)+"&";
	}
	reqLine+="&frm="+formname+"&timestamp="+Math.random();
	objScript.contentWindow.document.forms['upd'].passed.value = reqLine;
	objScript.contentWindow.document.forms['upd'].act.value = action;
	objScript.contentWindow.document.forms['upd'].submit();
	return false;
}


function resetAj(){
	var frm = document.getElementById ('eBuilder');
	frm.src='/init.htm';
}


function process(holder){
	var obj = document.getElementById ? document.getElementById(holder) : null;
	if (obj.className=='overlay')
	{
		obj.className='solid';
	}
		else
	{	
	   obj.className='overlay'
	}

}


function reactTip(obj){
	var id= obj.getAttribute("id");
	var obj1 = document.getElementById ? document.getElementById("r"+id) : null;
	if (obj1.style.display=="" || obj1.style.display=="none")
	{
	   obj1.style.display="block";
	   colorProcess(obj1);
	} else obj1.style.display="none";
}

function loadEvent(func) {	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
			oldonload();
			func();
		}
	}
}

function colorProcess(obj){
	var array1=new Array();
		array1 = ['0','3','6','9','C','E','F'];
	var array2=new Array(6,9,'C','E','F');
		array2 = ['6','9','C','E','F'];
	var color1=array2[(Math.floor(Math.random()*5))];
	var color2=array1[(Math.floor(Math.random()*7))];
	var color3=array1[(Math.floor(Math.random()*7))];
		obj.style.color='#'+color1+color1+color2+color2+color3+color3;
		h1.style.color='#'+color1+color1+color2+color2+color3+color3;

}

function run_list(allnews){
	clearTimeout(runNews);
	ind=1;
	if (news_id>=allnews.length) news_id=0;
	objRun.href = href_array[news_id];
	currentStr = allnews[news_id];
	run_thru(currentStr);
}


function run_thru(val){
		if (ind<=val.length){
			objRun.innerHTML = val.substr(0,ind);
			ind ++;
			eval('runTimer='+setTimeout('run_thru("'+addslashes(val)+'")',50));
		} else {
			clearTimeout(runTimer);
			news_id++;
			eval("runNews="+setTimeout("run_list(str_array)",3000));
		}

}

function launchShutle(){

	  var vleft=parseInt(shutle.style.left);
	  if (vleft>10 && direction==1)
	  {
			shutle.style.left=vleft-2+'px';
	  } else if (vleft<=10 && direction==1){
	  		 direction=0;
	  }	else if (vleft<1270 && direction==0)
	  {
			shutle.style.left=vleft+2+'px';
	  }	else if (vleft>=1270 && direction==0)
	  {
			direction=1;
	  }
	  eval('runTimer='+setTimeout('launchShutle()',50));
}
//-->