function preloadIt()
  {
    imgArr = new Array('/images/navbar/navbar_02_over.gif',
                       '/images/navbar/navbar_03_over.gif',
                       '/images/navbar/navbar_04_over.gif',
                       '/images/navbar/navbar_05_over.gif',
                       '/images/navbar/navbar_06_over.gif',
                       '/images/navbar/navbar_07_over.gif');

     var len = imgArr.length;

     for (i=0;i<len;i++)
       {
          imgArr[i] = new Image();
       }

    }
  
  function download(val) 
    {
	  page = (val) ? "/download/index.php?ol=" + val : "/download/";
	 window.open(page,"Download","width=402,height=528,resizable=1,scrollbars=0,menubar=0,toolbar=0,directories=0,location=0,status=0");
    }
	
  function stefan(val) 
    {
	  page = (val) ? "/stefan/index.php?ol=" + val : "/stefan/";
	 window.open(page,"stefan","width=402,height=528,resizable=1,scrollbars=0,menubar=0,toolbar=0,directories=0,location=0,status=0");
    }	

  function rollover(img_name, img_src) { document[img_name].src = img_src; }
  function rolloff(img_name, img_src) { document[img_name].src = img_src; }

  function popup(winURL) 
    {
      window.open(winURL,"","width=350,height=400,resizable=yes,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no")
    }

function closeup(im,params)  
   {
     window.open("closeup.php?image=" + im + "","",params)
   }

function goToURL(val)
  {
    document.location.href = 'index.php?stid=' + val;
  }

function goto_URL(object) {
	    window.location.href = object.options[object.selectedIndex].value;
	}
    
function goToURL2(val1,val2)
  {
    document.location= 'index.php?ai=products&pid=' + val1 + '&psid=' + val2;
  }

var lastItem = 'menu2';
var visible = '';
var hidden = '';

	if (document.layers) {
	visible = 'show';
	hidden = 'hide';
	}
	
	if (document.all) {
	visible = 'visible';
	hidden = 'hidden';
	}
	
	if (document.getElementById) {
	visible = 'visible';
	hidden = 'hidden';

	}

function pop(menu) 
  {
	if (document.layers) {
	fieldMenu = document.layers[menu];
	lastMenu = document.layers[lastItem];
	}
	
	if (document.all) {
	fieldMenu = document.all(menu).style;
	lastMenu = document.all(lastItem).style;
	}
	
	if (document.getElementById) {
	fieldMenu = document.getElementById(menu).style;
	lastMenu = document.getElementById(lastItem).style;
	}
	
	lastMenu.visibility = hidden;
	fieldMenu.visibility = visible; 
	lastItem = menu;

  } 
  
 function checkType(val,loc)
   {
     document.location = loc;
   }
   
   
 function openWind(pageName,w,h,winName,home,wh)
  {
     page = home + "imageView.php?imageV=" + pageName + "&giid=" + winName + "&wid=" + w;
     params = "top=30,left=30,scrollbars=0,resizable=1,titlebar=0,width=500,height=" + wh;
     
     winName = open(page,winName,params);
     winName.focus();
  } 
           
          
 function toNew(val)
   {
      window.location.href = "../" + val;
   }
           
 function OW(page,win,params)
   {
      var wind = open(page,win,params);
      wind.focus();
   }
 
 function checkchars(cur)
   {
      var maxlength=254;
      if (cur.value.length > maxlength)
        { 
           alert("Please limit your input to 255 or less characters!");
           return false;
        }
   } 
           
 function confirmSubmit()
   {
      var agree=confirm("Are you sure you wish to continue the deletion?");
      if (agree)
	  return true ;
      else
	  return false ;
   }
 
 function toLoc(loc)
  {
     window.opener.parent.location.href = loc;
     self.blur();
  }