

function addRif() {
		
		var inputText = document.createElement("input");
		inputText.setAttribute("type","text");
		inputText.setAttribute("name","rife["+"]");
		inputText.style.width='425px';
		document.getElementById('rif').appendChild(inputText);
}


function addImg() {
		
		var descText = document.createElement("input");
		descText.setAttribute("type","text");
		descText.setAttribute("name","imgD["+"]");
		descText.style.width='170px';
	 	descText.style.marginRight='4px';
		document.getElementById('image').appendChild(descText);
		
		var inputText = document.createElement("input");
		inputText.setAttribute("type","file");
		inputText.setAttribute("name","img["+"]");
		inputText.style.width='170px';
		document.getElementById('image').appendChild(inputText);
}


function addAll() {
		var descText = document.createElement("input");
		descText.setAttribute("type","text");
		descText.setAttribute("name","allD["+"]");
		descText.style.width='170px';
	 	descText.style.marginRight='4px';
		document.getElementById('all').appendChild(descText);
		
		
		var inputText = document.createElement("input");
		inputText.setAttribute("type","file");
		inputText.setAttribute("name","all["+"]");
		inputText.style.width='170px';
		document.getElementById('all').appendChild(inputText);
}


function showcat(value)
{
	
	document.location.href = 'cat_mod.php?id=' + value;
}

function selectCat(value,type)
{
	redirect = 'art_mod.php?cat=' + value;
	if(type) redirect += '&types=' + type;
	document.location.href = redirect;
}

function showType(value,cat)
{
	redirect = 'art_mod.php?types=' + value;
	if(cat) redirect += '&cat=' + cat;
	document.location.href = redirect;
}


function selectArt(value,type,cat)
{
	redirect = 'art_mod.php?artchoice=' + value;
	if(cat) redirect += '&cat=' + cat;
	if(type) redirect += '&types=' + type;
	//alert(redirect);
	document.location.href = redirect;
}


function showCalendarWin()
{
   
	var win = window.open('cal.php','path','width=500, height=500');
	win.focus()	;
		win.resizeTo(L,H);
}

function selectEvent(data)
{
	redirect = 'eve_mod.php?data='+data;
	//alert(redirect);
	document.location.href = redirect;
}

function selectTitle(id)
{

	redirect = 'eve_mod.php?';
	redirect += 'idapp='+id;

	document.location.href = redirect;
}

function showEvent(id,data)
{
//	alert(data);
	redirect = 'eve_mod.php?';
	if(id)
		redirect += '&idapp='+id;
	if(data)
		redirect += '&data='+data;
	document.location.href = redirect;
}


function popitup(url,name) {
	newwindow=window.open(url,name,'');
	
}

function popup(url,name, w, h)
{
	   var w = 380;
       var h = 500;
       var pw = Math.floor((screen.width-w)/2);
       var ph = Math.floor((screen.height-h)/2);
       window.open(url,'',"scrollbars=yes,width=" + w + ",height=" + h + ",top=" + ph + ",left=" + pw);
}


function popupsize(url,name, w, h)
{

       window.open(url,'',"width=" + w + ",height=" + h);
}

function enableRegister()
{

	document.reg.registra.disabled = false;
}


function disableRegister()
{

	document.reg.registra.disabled = true;
}