function swapurl(targ,selObj,restore)
{

	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
								 
}

function swapurl2(targ,selObj,restore)
{
var color = document.getElementById('color_head').value;
/*alert(color);*/
	eval(targ+".location=''");
	if (restore) selObj.selectedIndex=0;
							 
}


function insRow(nr)
  {
  
  var i=nr
  for(i=9; i>=nr; i--)
  {
	var x=document.getElementById('myTable').insertRow(0)
  var y=x.insertCell(0)
  
  y.innerHTML='Fisier principal: <input type="radio" name="primary_fotografie" value="fotografie_'+i+'" /></td><td><input type="file" style="height:19px; width:360px;"  name="fotografie_'+i+'"  />'
  
  }
  document.getElementById('alte5').disabled = true;
  }



function countertext(field,count, max) {
// if the length of the string in the input field is greater than the max value, trim it
if (field.value.length > max)
	field.value = field.value.substring(0, max);
else
	// calculate the remaining characters
	count.value = max - field.value.length;
}

function cleararea(field,count,max){
field.value='';
count.value=max;
}



function view_results($id)
{
document.getElementById($id).style.display = "block";
}
	
function show_date($an)
{
document.getElementById($an).style.display = "block";
}

function hide_date($an)
{
document.getElementById($an).style.display = "none";
}



