function screenPrint()
{
//document.body.style.zoom = "80%";
window.print();
//document.body.style.zoom = "100%";
}

function textCounter(field, countfield, maxlimit) 
{
reqLength = document.all[field.id].value.length;
if (reqLength > maxlimit)
{
window.alert("WARNING - You have reached the maximum permissible length.");
field.value = field.value.substring( 0, maxlimit );
return;
}
countfield.innerHTML = maxlimit - reqLength;
}

//archiving script
function editRA(Control)
{
document.getElementById(Control).value = showModalDialog("archivePrompt.html","","dialogHeight:200px; dialogWidth:700px; center:1; status:no; edge:raised; scroll:no;");
if(document.getElementById(Control).value == "")
{
return false;
}
}

function ToggleHelp()
{
if (document.all.HelpText.style.display == "none")
{
document.all.HelpText.style.display = "block";
}
else
{
document.all.HelpText.style.display = "none";
}
}

function ToggleHelp1()
{
if (document.all.HelpText1.style.display == "none")
{
document.all.HelpText1.style.display = "block";
}
else
{
document.all.HelpText1.style.display = "none";
}
}

function onClick(source, target)
{
var dd = document.getElementById(source);
if(dd.selectedIndex > 0)
{
document.getElementById(target).value = dd.options[dd.selectedIndex].text;
}
}
function ShowPanel(control)
{
document.getElementById(control.id).style.display = 'block';
}