num = 0;
dah = 10

function dispMoreFiles(type) {
	if (num<dah) {
		var filelocal = document.getElementById('morefiles');
		var fileID = "file"+num+"input";
		var fileDIV = document.createElement('div');
		fileDIV.setAttribute("id", fileID);
		if (type == 'url_upload') {
			fileDIV.innerHTML = "<b><font face=Tahoma color=#333333>Url: </font></b><INPUT name='userfile[]' id='"+fileID+"' TYPE='text' size='50'><br>";
		} else {
			fileDIV.innerHTML = "<INPUT name='userfile[]' id='"+fileID+"' class='file_input' TYPE='file' size='50'><br>";
		}
		filelocal.appendChild(fileDIV);
		num++;
	} else {
		alert('Você so pode adicionar '+dah+' arquivos para upload.');
	}
}
	
function rmvMoreFiles(divNum){
	var d = document.getElementById('morefiles');
	var olddiv = document.getElementById(divNum);
	d.removeChild(olddiv);
	num--;
}
function toggle_lightbox(url, div)

{

	var block_id    = fetchElementById("page_body");

	var request_url = (url + (((url.match(/\?/)) ? "&" : "?") + "lb_div=" + div));



	if (url != "no_url") {

		var lightbox_id  = document.createElement("div");

		

		scroll(0, 0);

	

		lightbox_id.setAttribute("id", div);

		

		xmlhttp_handle.open("GET", request_url, false);

		xmlhttp_handle.send(null);



		lightbox_id.innerHTML  = "<div class=\"lightbox_main\">" + xmlhttp_handle.responseText + "</div>";

		lightbox_id.innerHTML += "<div class=\"lightbox_background\">&nbsp;</div>";

		

		block_id.appendChild(lightbox_id);

	} else {

		var lightbox_id = fetchElementById(div);



		block_id.removeChild(lightbox_id);

	}



	return;

}
function highlight(field) {
       	field.focus();
       	field.select();
}

function toggle(id) {
	var obj = "";
	if(document.getElementById){
		obj = document.getElementById(id);
	}else if(document.all){
		obj = document.all[id];
	}else if(document.layers){
		obj = document.layers[id];
	}else{
		return 1;
	}
	if (!obj){
		return 1;
	}else if(obj.style){
		obj.style.display = ( obj.style.display != "none" ) ? "none" : "";
	}else{ 
		obj.visibility = "show"; 
	}
}

_uacct = "UA-1125794-2";

if(dah != 10){
	alert("INVALID KEY");
}

