<!--
var noneChecked = false;

var browser;

if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4)
{
	browser = "IE";
}
else
{
	if (navigator.appName == "Netscape")
	{
		if (parseInt(navigator.appVersion) >= 5)
		{
			browser = "N6";
		}
		else
		{
			if (parseInt(navigator.appVersion) >= 4)
			{
				browser = "N";
			}
		}
	}
}



function ScreenShot(docName)
{
	var maxw = 640;
	var maxh = 480;
	if (window.screen) 
	{
	  maxw = window.screen.availWidth;
	  maxw = maxw - 10;
	  maxh = window.screen.availHeight;
	  maxh = maxh - 30;
	}
	window.open(docName,"viewer","toolbar=no,scrollbars=yes,resizable=yes,width=" + maxw + ",height=" + maxh + ",top=0,left=0");
}


var theText = "";

function SetFocus(question)
{
	var theValue = "";
	
	theValue = document.aiss[question].value;
	
	if(theValue == theText)	
	{
		document.aiss[question].value = "";
	}
}

function LoseFocus(question,box)
{
	var theValue = "";
	
	theValue = document.aiss[question].value;
	
	if(theValue == "")	
	{
		document.aiss[question].value = theText;
		document.aiss[box].checked = false;
	}
	else
	{
		document.aiss[box].checked = true;		
	}
}

function LoseFocus2(question,box)
{
	var theValue = "";
	
	theValue = document.aiss[question].value;
	
	if(theValue != "")	
	{
		document.aiss[box].checked = true;		
	}
}

function CheckBox(question,box)
{
	if(document.aiss[box].checked == true)
	{
		document.aiss[question].focus();
		return(false);
	}
	else
	{
		document.aiss[box].checked = false;
		document.aiss[question].value = theText;
		document.aiss[box].focus();
		return(false);
	}
	
	return(true);
}

function DoCheckBox(box,question,textToClear)
{
	var i;
	i = 0;
	var boxNum;
	boxNum = document.aiss.length;
	var qLength;
	qLength = question.length;
	var boxName;
	var reCheckedBoxCount = 0;
	
	if (document.aiss[box].checked)
	{
		if (noneChecked == true)
		{
			for (i = 0; i < boxNum; i ++)
			{
				boxName = document.aiss[i].name;
				if (document.aiss[i].type == "checkbox")
				{
					if ((boxName != box) && (boxName.indexOf(question, 0)!=-1))
					{
						if (document.aiss[i].checked)
						{
							reCheckedBoxCount++;
						}
					}
				}
			}
	
			if (reCheckedBoxCount == 1)
				document.aiss[box].checked = false;
		}
	}
	
	noneChecked = document.aiss[box].checked;
	
	if (document.aiss[box].checked)
	{
		for (i = 0; i < boxNum; i ++)
		{
			boxName = document.aiss[i].name;
			if (boxName != box && (boxName.indexOf(question, 0)!=-1))
			{
				document.aiss[i].checked = false;
			}
		}
		if (textToClear != '')
		{
			document.aiss[textToClear].value = "";
		}
	}
}


function IsAllowed(box,question)
{
	if (document.aiss[box].checked)
	{
		document.aiss[question].blur();
		return false;
	}
	return true;
}

function validateNumber(control)
{
	var size;
	var i;
	var result;
	
	var value = document.forms["aiss"].elements[control].value;
	
	size = value.length;
	
	if (size > 0)
	{
		for (i = 0; i < size; i++)
		{
			if (!isNumberChar(value.substring(i,i + 1)))
			{				
				alert("The value you have entered is not a number.\n" + "Please try again.");
				document.forms["aiss"].elements[control].value = "";
				document.forms["aiss"].elements[control].focus();
				return;
			}
		}
	}
}

function isNumberChar (InString)  {
	if(InString.length!=1) 
		return (false);
	RefString="1234567890";
	if (RefString.indexOf (InString, 0)==-1) 
		return (false);
	return (true);
}

function validateRadio(textbox,index,max)
{
        if (index <= max)
        {
                document.aiss[textbox].value = theText;
        }
}

function CheckRadio(question,box,index)
{
        if(document.aiss[box][index].checked == true)
        {
                document.aiss[question].focus();
                document.aiss[question].value = "";
				//document.aiss[question].blur();
        }
        else
        {
                document.aiss[box][index].checked = false;
                document.aiss[question].value = theText;              
        }               
}

function LoseFocusRadio(question,box,index)
{
        var theValue = "";

        theValue = document.aiss[question].value;

        if(theValue == "")      
        {
                document.aiss[question].value = theText;
                document.aiss[box][index].checked = false;
        }
        else
        {
                document.aiss[box][index].checked = true;             
        }
}

function LoseFocusRadio2(question,box,index)
{
        var theValue = "";
        
        theValue = document.aiss[question].value;
        
        if(theValue != "")      
        {
                document.aiss[box][index].checked = true;             
        }
}

function validateRadio2(textbox,index,max)
{
	if (index <= max)
	{
		document.aiss[textbox].value = theText;
	}
}

//-->
