// JavaScript Document
function WimdowWidth2()
{
alert("ww")
var winWidth, winHeight, d=document;
if (typeof window.innerWidth!='undefined') {
 winWidth = window.innerWidth;
 winHeight = window.innerHeight;
} else {
 if (d.documentElement && 
  typeof d.documentElement.clientWidth!='undefined' && 
   d.documentElement.clientWidth!=0) {
  winWidth = d.documentElement.clientWidth
  winHeight = d.documentElement.clientHeight
 } else {
  if (d.body && 
   typeof d.body.clientWidth!='undefined') {
   winWidth = d.body.clientWidth
   winHeight = d.body.clientHeight
  }
 }
}
alert(winWidth)
return winWidth.toString()
}

function print_image(current_image,last_selected) {

var url ,wheight, wwidth;
if (current_image == 0) {
	alert("Select an image before printing")
	}
else {
//	url = '/docweb/viewing/sendprint.asp?docname='+top.doc_name[top.current_image]
	url = 'viewprint.asp?docname='+last_selected
	wheight = 580
	wwidth = 780
	print_window = window.open(url,"","menubar,scrollbars,height="+wheight+",width="+wwidth)
	print_window.focus()
	}
}

function printall(doccount) {

var url ,wheight, wwidth;
//	url = '/docweb/viewing/sendprint.asp?docname='+top.doc_name[top.current_image]
	url = 'viewprintall.asp?docs='+doccount
	wheight = 580
	wwidth = 780
	print_window = window.open(url,"","menubar,scrollbars,height="+wheight+",width="+wwidth)
	print_window.focus()
}

function email_image(current_image,last_selected) {

var url ,wheight, wwidth;
if (current_image == 0) {
	alert("Select an image before emailing")
	}
else {
//	url = '/docweb/viewing/sendprint.asp?docname='+top.doc_name[top.current_image]
	url = 'viewemail.asp?docname='+last_selected
	wheight = 580
	wwidth = 780
	location = url
	}
}

function emailall(doccount) {

var url ,wheight, wwidth;
//	url = '/docweb/viewing/sendprint.asp?docname='+top.doc_name[top.current_image]
	url = 'viewemail.asp?docs='+doccount
	wheight = 580
	wwidth = 780
	location = url
}

function expand_image(current_image,last_selected) {

var url;
if (current_image == 0) {
	alert("Select an image before expanding")
	}
else {
//	url = '/docweb/viewing/expand.asp?docname='+top.doc_name[top.current_image]
//	parent.main.location.pathname = url
	url = 'expand.asp?docname='+last_selected.name+"&id="+doc_id.toString()
	location = url

	}
}
