// JavaScript Document
function showTerm()
{
	/*if(document.measure.optlanguage[1].checked==true)
		document.getElementById("terms1").style.display="block";	
	else
			document.getElementById("terms").style.display="block";	*/
	if(document.measure.hdnLang.value==2)
		document.getElementById("terms1").style.display="block";
	else
		document.getElementById("terms").style.display="block";	
}
function hideTerm()
{
document.getElementById("terms").style.display="none";
document.getElementById("terms1").style.display="none";
}

function sam()
{
		alert("Hello");
}

// check the field is empty or not
function isEmpty(theField)
{
    if(theField.value=="")
        {return true;}
    else
		{return false;}
}

function notValidEmail( str )
{
         mailRE = new RegExp( );
         mailRE.compile('^[._a-z0-9-]+@[.a-z0-9-]+[.]{1}[a-z]{2,4}$', 'gi' );
         return !(mailRE.test( str.value));
}

function checkSelectRadio(thisField)
	{
		var flag;
		flag=false;
		
		for (i=0;i<thisField.length;i++)
		{
			if (thisField[i].checked==true)
			{
				flag=true;
				break;
			}
		}
		if (flag==false)
		{ return false; }
		else
		{ return true; }
	}
function opennewwindow(title,path,scrollbar,resizewin,winwidth,winheight)
{
	var optdetails="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scrollbar+",resize="+resizewin+",width="+winwidth+",height="+winheight;
	var win=window.open(path);
	win.focus();
}
function unloadme()
{
	window.close();
}

function openSmallWindow(url,wname,winoption)
{
window.open(url,wname,winoption);
}

function toggleHint(sMode, sElementName, sElement, sWidth)
{
	sDisplay = (sMode == "show") ? "inline" : "none";
	if(oElement = eval(document.getElementById('hint_' + sElementName)))
	{
		oElement.style.display = sDisplay;
	}
}

function openSmallWindow(url,wname,winoption)
{
window.open(url,wname,winoption);
}
function showlen(x,evt)
{
	str=x.value;
	l=str.length;
	c=800-l;
	var charCode=(evt.charCode)?evt.charCode:((evt.which)?wvt.which:evt.keyCode);
	if (c<0)
	{
		if((charCode>=33 && charCode<=40)|| charCode==8 || charCode==46)
		{
			return true;
		}
		else
		{//alert("sadf");
		return false;
		}
	}
	l=str.length;
	c=800-l;
	document.getElementById("lenbox").innerHTML=c;
}

