/* created 2010-03-16 13:39:50 by NOEO Template Editor */ 
function clearInput ()
{
 var myfield;
 myfield = document.getElementById("input_search");
 myfield.value = "";
} 
function showImage ()
{
 myimg = document.getElementById("detail_file");
 myimg.style.display = "block";
} 
function openDetail(myimage, mywidth, myheight)
{
 var mywindow;
 mywindow = document.getElementById("detail_window");
 myimg = document.getElementById("detail_file");
 myimg.style.display = "none";
 myimg.src = "";
 myimg.onload = showImage;
 myimg.src = myimage;
 
 myimg.width = mywidth;
 myimg.height = myheight;
 mywindow.style.width = mywidth+78+"px";
 mywindow.style.height = myheight+55+"px";
 
 var scrollPos;
 var iWidth;
 if (typeof window.pageYOffset != 'undefined')
 {
 scrollPos = window.pageYOffset;
 iWidth = window.innerWidth;
 }
 else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat')
 {
 scrollPos = document.documentElement.scrollTop;
 iWidth = document.body.offsetWidth;
 }
 else if (typeof document.body != 'undefined')
 {
 scrollPos = document.body.scrollTop;
 iWidth = document.body.offsetWidth;
 }
 
 mywindow.style.left = (iWidth/2)-((mywidth+78)/2)+"px";
 mywindow.style.top = 100+scrollPos+"px";
 
 mywindow.style.visibility = "visible";
 
} 
function closeDetail()
{
 var mywindow;
 mywindow = document.getElementById("detail_window");
 mywindow.style.visibility = "hidden";
} 
function handCursor()
{
 var mywindow;
 mywindow = document.getElementById("detail_window");
 mywindow.style.cursor = "pointer";
} 
function defaultCursor()
{
 var mywindow;
 mywindow = document.getElementById("detail_window");
 mywindow.style.cursor = "default";
} 
function selectCheckboxes(myform,formfield)
{
if(formfield.checked==true) {
 for (var i=0; i < document.forms[myform].elements.length; i++)
 {
 document.forms[myform].elements[i].checked = true;
 }
} else {
 for (var i=0; i < document.forms[myform].elements.length; i++)
 {
 document.forms[myform].elements[i].checked = false;
 }
}
} 
function unselectCheckboxes(myform)
{
 for (var i=0; i < document.forms[myform].elements.length; i++)
 {
 document.forms[myform].elements[i].checked = false;
 }
} 
function submitForm(myform)
{
 document.forms[myform].submit();
}