﻿<!--
// JScript File

var newwindow;
function load(url)
{
	newwindow=window.open(url,'name','height=180,width=340,left=150,top=175,scrollbars=no,status=no,toolbar=no');
	if (window.focus)
	{
		newwindow.focus();
	}
}



var detailwindow;
function Details(url, width,  height)
{
	detailwindow=window.open(url,'popup','height=' + height + ',width=' + width + ',left=100,top=50,scrollbars=yes,status=no,toolbar=no,resizable=no');
	
	if (window.focus)
	{ detailwindow.focus(); }
}



var mapwindow;
function ViewMap(url)
{
	mapwindow=window.open(url,'map','width=800,height=650,left=25,top=25,scrollbars=yes,status=no,toolbar=no,resizable=yes');
	if (window.focus)
	{
		mapwindow.focus();
	}
}



function CloseWindow()
{
	this.window.opener.location.reload();
	this.window.close()
}



function PrintPage()
{
    try
    {
	    identity=document.getElementById("control");
	    identity.className="noprint";
    }
    catch (err) {}
	
    try
    {
	    identity2=document.getElementById("notescon");
	    identity2.className="noprint";
    }
    catch (err) {}
		
    this.window.print();
	
    try
    {
	    identity2=document.getElementById("notescon");
	    identity2.className="";
    }
    catch (err) {}
	
    try
    {
	    identity=document.getElementById("control");
	    identity.className="";
    }
    catch (err) {}
}



function SwitchDiv(DivID)
{
  var style_sheet = GetStyleObject(DivID);
  if (style_sheet)
  {
    HideAll();
    ChangeObjectVisibility(DivID,"visible");
  }
  else 
  { alert("sorry, this only works in browsers that do Dynamic HTML"); }
  
}//SwitchDiv


function HideAll()
{
   //ChangeObjectVisibility("standard" + DivID.charAt(DivID.length-1),"hidden");
   //ChangeObjectVisibility("custom" + DivID.charAt(DivID.length-1),"hidden");
   ChangeObjectVisibility("standard","hidden");
   ChangeObjectVisibility("custom","hidden");

}//HideAll


function CancelItem()
{
	HideAll();
	document.getElementById("cutting1").checked = false;
	document.getElementById("cutting2").checked = false;
	
}//CancelItem


function GetStyleObject(objectId) {
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(document.getElementById && document.getElementById(objectId))
	{
		return document.getElementById(objectId).style;
	}
	else if (document.all && document.all(objectId))
	{  
		return document.all(objectId).style;
	} 
	else if (document.layers && document.layers[objectId])
	{ 
		return document.layers[objectId];
	}
	else
	{
		return false;
	}
}//GetStyleObject


function ChangeObjectVisibility(objectId, newVisibility) {
    // get reference to cross-browser style object then make sure object exists
    var styleObject = GetStyleObject(objectId);
    if(styleObject)
    {
		styleObject.visibility = newVisibility;
		return true;
    }
    else
    {
		// we couldn't find the object, so we can't change its visibility
		return false;
    }    
}//ChangeObjectVisibility

function ToggleLayer(id)
{
	var ToggleObject = new Object();
	ToggleObject.Element = document.getElementById(id);
	if (ToggleObject.Element.style.display == '')
	{ ToggleObject.Element.style.display = 'none'; }
	else if (ToggleObject.Element.style.display == 'inline')
	{ ToggleObject.Element.style.display = 'none'; }
	else
	{ ToggleObject.Element.style.display = 'inline'; }
}

var zValue = 1001;
function BringToFront(id)
{
	var obj = document.getElementById(id);
	obj.style.zIndex = zValue;
	zValue++;
}

//-->
