function goto_page(url) {
	location.href=(url)
}

function goto_preview(image) {
	linkWindow=window.open('/admin/library/pictures/pict-pvw.asp' + "?picture=" + image, "previewwindow", "width=2, height=2, resizable=yes, scrollbars=yes,left=300,top=150")
}

function preview_link1() {
	linkWindow=window.open(document.inputform.frmLinkURL1.value, "previewwindow")
}

function preview_link2() {
	linkWindow=window.open(document.inputform.frmLinkURL2.value, "previewwindow")
}

function preview_link3() {
	linkWindow=window.open(document.inputform.frmLinkURL3.value, "previewwindow")
}

function preview_links() {
	linkWindow=window.open(document.inputform.frmLinkURL.value, "previewwindow")
}

function set_focus() {
	if (document.inputform) {
		document.inputform.elements[0].focus();
	}
}

function goto_window(url) {
	linkWindow=window.open(url)
}

function goto_document(doc) {
	linkWindow=window.open('/library/documents/' + doc, "previewwindow","left=150,top=100")
}

function preview_window() {
	linkWindow=window.open(url)
}

function fitpic() { 
 	var arrTemp=self.location.href.split("?"); 
   	var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
   	var NS = (navigator.appName=="Netscape")?true:false; 
    iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
    iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
    iWidth = document.images[0].width - iWidth; 
    iHeight = document.images[0].height - iHeight; 
    window.resizeBy(iWidth, iHeight); 
    self.focus(); 
}

function closePreviewWindow() {
	viewWindow=window.open("xyz", "previewwindow", "width=2, height=2, resizable=yes, scrollbars=yes,left=300,top=150")
	viewWindow.close();
}

function menu_move_menu()
{
    if (document.layers)
    {
        floating_menu.left = fm_next_x;
        floating_menu.top = fm_next_y;
    }
    else
    {
        floating_menu.style.left = fm_next_x + 'px';
        floating_menu.style.top = fm_next_y + 'px';
    }
}

function menu_compute_shifts()
{
    fm_shift_x = has_inner
        ? pageXOffset
        : has_element
          ? document.documentElement.scrollLeft
          : document.body.scrollLeft;
    if (target_x < 0)
        fm_shift_x += has_inner
            ? window.innerWidth
            : has_element
              ? document.documentElement.clientWidth
              : document.body.clientWidth;

    fm_shift_y = has_inner
        ? pageYOffset
        : has_element
          ? document.documentElement.scrollTop
          : document.body.scrollTop;
    if (target_y < 0)
        fm_shift_y += has_inner
            ? window.innerHeight
            : has_element
              ? document.documentElement.clientHeight
              : document.body.clientHeight;
}

function menu_float_menu()
{
    var step_x, step_y;

    menu_compute_shifts();

    step_x = (fm_shift_x + target_x - fm_next_x) * .15;
    if (Math.abs(step_x) < .5)
        step_x = fm_shift_x + target_x - fm_next_x;

    step_y = (fm_shift_y + target_y - fm_next_y) * .15;
    if (Math.abs(step_y) < .5)
        step_y = fm_shift_y + target_y - fm_next_y;

    if (Math.abs(step_x) > 0 ||
        Math.abs(step_y) > 0)
    {
        fm_next_x += step_x;
        fm_next_y += step_y;
        menu_move_menu();
    }

    setTimeout('menu_float_menu()', 20);
}