// JavaScript Document
// Copies passed text to the clipboard
function copyToClipboard(text) {
	var range = document.body.createTextRange();
	range.findText(text);
	range.select();
	document.execCommand("Copy");
	document.execCommand("Unselect");
}

function properties( imgSrc, hSize, vSize, status ) {
	if ( document.images ) {
		this.image = new Image( hSize, vSize );
		this.image.src = imgSrc;
		this.status = status;
	}
}

popUpWin = "nowin";
function openWin(winName, file, width, height) {
	var h=height;
	var w=width;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status,toolbar,menubar,location';
	popUpWin = window.open( file , winName, winprops );
	popUpWin.focus();
}

function popWin(name, file, width, height, status, resizable, scrollable) {
	var h=height;
	var w=width;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status='+status+',resizable='+resizable+',scrollbars='+scrollable;
	popUpWin = window.open( file , name, winprops );
	popUpWin.focus();
}

function closePopUp() {
	if( popUpWin != "nowin" )
		if( !popUpWin.closed )
			popUpWin.close();
}

