function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}

function over (obj, clas) 
{
  if (obj.className != clas+'_s'){
    obj.className = clas+'_roll';
  }
}

function unover (obj, clas) 
{
  if (obj.className != clas+ '_s'){
    obj.className = clas;
  }
}

function on_Change(hiddenField, formName)
{
	document.getElementById(hiddenField).value=true;
	document.getElementById(formName).submit();
}

function onDeleteImage(photoId, hiddenField, formName)
{
	choice=confirm("Do you really want to delete this photo?");
	if (choice==true)
	{
		document.getElementById('photo_id').value = photoId;
		document.getElementById(hiddenField).value=true;
		document.getElementById(formName).submit();
	}
}

function onEditImage(photoId, hiddenField, formName)
{
	document.getElementById('photo_id').value = photoId;
	document.getElementById(hiddenField).value=true;
	document.getElementById('edit_photo').value=true;
	document.getElementById(formName).submit();
}

function onUpdateImage(photoId, hiddenField, formName)
{
	document.getElementById('photo_id').value = photoId;
	document.getElementById(hiddenField).value=true;
	document.getElementById('update_photo').value=true;
	document.getElementById(formName).submit();
}

function on_Click(photo, photo_id)
{	
	parent.view_frame.document.getElementById('photo_fname').value = photo;
	parent.view_frame.document.getElementById('photo_id').value = photo_id;
	parent.view_frame.document.photo_form.submit();
}

function on_Details(pr_id)
{
	document.getElementById('pr_id').value=pr_id;
	document.getElementById('search_form').submit();
}