var copytoclip=1;
function HighlightAll(theField) {
	var tempval=theField;
	tempval.focus();
	tempval.select();
	if (document.all&&copytoclip==1){
		therange=tempval.createTextRange();
		therange.execCommand("Copy");
		window.status="Contents highlighted and copied to clipboard!";
		setTimeout("window.status=''",1800);
	}
}

var screenPixelWidth = screen.width;
var screenPixelHeight = screen.height;
var screenCenter = screenPixelWidth / 2;
var screenMiddle = screenPixelHeight / 2;

function centerItemToScreen(wdth) {
	var itemWidth = wdth;
	var itemCenter = itemWidth / 2;
	var leftStyleValue = Math.round(screenCenter - itemCenter);
	return leftStyleValue;
}

function middleItemToScreen(ht) {
	var itemHeight = ht;
	var itemMiddle = itemHeight / 2;
	var topStyleValue = Math.round(screenMiddle - itemMiddle);
	topStyleValue = topStyleValue - 25;
	return topStyleValue;
}

function openMiniWindow(loc) {
	var winWidth = 550;
	var winHeight = 350;
	var centerValue = centerItemToScreen(winWidth);
	var middleValue = middleItemToScreen(winHeight);
	theChildWindow = window.open(loc,'theMiniWindow','width=' + winWidth + ',height=' + winHeight + ',top=' + middleValue + ',left=' + centerValue + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}


function openImageWindow(loc) {
	theImageWindow = window.open(loc,'theImageWindow','width=725,height=550,top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}


