function popup(myimg, mytitle, mywidth, myheight)
{
	if (! window.focus)return true;
	var newWindow;
	var hTML;
	hTML = "<html><head><title>" + mytitle + "</title></head><body><img border=0 src=" + myimg + " alt=''></body></html>";
	newWindow=window.open('', 'wcalm', 'left=75,top=50,resizable=yes,scrollbars=no');
	newWindow.document.open();
	newWindow.document.write(hTML);
	newWindow.document.focus();
	newWindow.document.close();
	newWindow.resizeTo(mywidth+27, myheight+50);
	return false;
}

function popup2(myurl, mywidth, myheight, mywindow)
{
	if (! window.focus)return true;
	var newWindow;
	newWindow=window.open(myurl, mywindow, 'left=75,top=50,resizable=yes,scrollbars=yes');
	newWindow.resizeTo(mywidth+30, myheight+95);
	newWindow.focus();
	return false;
}
function popup_help(myurl)
{
	if (! window.focus)return true;
	var newWindow;
	newWindow=window.open(myurl, 'wcalmhelp', 'left=75,top=50,resizable=yes');
	newWindow.resizeTo(700, 550);
	newWindow.focus();
	return false;
}
function copyTextareaToClipboard(tArea) {
	tArea.focus();
	tArea.select();
	tArea.createTextRange().execCommand("Copy");
}
function adjustIFrameSize (myheight)
{
	
	//document.getElementById('idmain').width = document.body.clientWidth - 300;
	document.getElementById('idmain').width = 590;
	//document.getElementById('idmain').height = document.getElementById('idmain').document.body.clientHeight + 'px';
	document.getElementById('idmain').height = myheight;
}

