 
function OpenLinkWin(windowname){
   var thename = 'Link'; 
   var str = "resizeable=1,height=750,width= 750";      
          if (window.screen) {
            var ah = screen.availHeight - 30;
            var aw = screen.availWidth - 10;

            var xc = (aw - 500) / 2;
            var yc = 30;

            str += ",left=" + xc + ",screenX=" + xc;
            str += ",top=" + yc + ",screenY=" + yc + ",toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=1,resizable=1";
          }
           theWindow = window.open(windowname,thename, str);   	
}
function PrintPage() {
if (window.print != null) { 
	window.print(); 
	} 
else { 
	alert('Your browser does not support this shortcut.  Please select Print from the File menu.'); 
	}
};
function movepic(img_name,img_src) {
 var sel = document.getElementById(img_name);
sel.src=img_src;
}   
function DoZoom(num){

ZoomToLevel(parseFloat(num))

}
function ChangeMenus(themenu){

var sel;
var sel2;
var link1;
sel = document.getElementById('middle');
sel2 = document.getElementById('middle2');

link1 = document.getElementById('a0');
link2 = document.getElementById('a1');
if (themenu=='middle'){
    link1.style.color = "red"
    link2.style.color = "black"
}
else{
    link1.style.color = "black"
    link2.style.color = "red"
}

link1.blur()
link2.blur()

if (themenu=='middle'){
    if (sel.style.display=='none'){
        toggleDisplay('middle');
        toggleDisplay('middle2');
    }
}
else{
    if (sel2.style.display=='none'){
        toggleDisplay('middle2');
        toggleDisplay('middle');
    }
}
 document.frmViewer.MenuHelp.value = themenu

}
function Unselect(theRad){

   if (theRad=='Changemap'){
      ChangeMenus('mapcon');
   }
   else{
      ChangeMenus(theRad);
   }
}
function ToolModeSet(which){
   var sel = document.getElementById('imgMapCanvas');
   var testindex;
   var test;
if (which=='1'){
	document.frmViewer.MTool.value = 'ZoomIn';
	handleToolClick(parseInt(1));
	test = document.frmViewer.imgZoom.src
	testindex = test.indexOf('images')
	test = test.substring(testindex+7, testindex+21)
	if (test != "zoomin_SEL.gif") {
	    document.frmViewer.imgZoom.src = "images/zoomin_SEL.gif";
	    document.frmViewer.imgPan.src = "images/pan_1.gif";
	}
	document.getElementById("imgMapCanvas").style.cursor = "crosshair";
}
else{
	document.frmViewer.MTool.value = 'Pan';
	handleToolClick(parseInt(2));
	test = document.frmViewer.imgZoom.src
	testindex = test.indexOf('images')
	test = test.substring(testindex+7, testindex+19)
	if (test != "images/zoomin_1.gif") {
	    document.frmViewer.imgZoom.src = "images/zoomin_1.gif";
	    document.frmViewer.imgPan.src = "images/pan_SEL.gif";
	}
	document.getElementById("imgMapCanvas").style.cursor = "hand";

}
}
function toggleDisplay(element){
   element = document.getElementById(element);
  if(element) {
    style = element.style || element;
    style.display = ('block' == style.display)
                  ? 'none' : 'block';
  }
}
function ResetWindow(){

opener.ClearWin()


}