function focus_fn()
{
    var txtRange = stepm.createTextRange();
    txtRange.moveStart( "character", 0 );
    txtRange.moveEnd( "character", stepm.length );
    txtRange.select();
}
function focus1_fn()
{
    var txtRange = document.code_fr.code.createTextRange();
    txtRange.moveStart( "character", 0 );
    txtRange.moveEnd( "character", document.code_fr.code.length );
    txtRange.select();
}
function isabc()
{
	if(! document.reg_fr.tac_ck.checked )
	{
			window.alert("YOU MUST ACCEPT OUR TERMS AND CONDITIONS TO REGISTER");
			return false;
	}
			return true;
}
function isPass()
	{
		var str = document.reg_fr.passwd.value;
		if ((str == "") || (str.length < 5))
		{
			alert("\nThe PASSWORD field is either empty or less than 5 chars.\n\nPlease re-enter your Password.")
			document.reg_fr.passwd.focus();
			return false;
		}
		var str = document.reg_fr.password1.value;
		if ((str == "") || (str.length < 5))
		{
			alert("\nThe Confirm PASSWORD field is either empty or less than 5 chars.\n\nPlease re-enter your Password.")
			document.reg_fr.password1.focus();
			return false;
		}

		return true;
	}
function isValidemail()
	{
		var email = document.reg_fr.user_id.value
		if(email == "")
		{
			alert("Please enter a Email address.");
			document.reg_fr.user_id.focus();
			return false;
		}
			if ( (email != "") && ((document.reg_fr.user_id.value.indexOf("@")==-1) ||(document.reg_fr.user_id.value.indexOf(".")==-1)))
			{
				alert	("Please enter a valid Email address.");
				window.reg_fr.user_id.focus();
				return false;
			}
		return true;
	}
function isValidateWebsite()
{
	url=document.reg_fr.weburl.value;
	if ( (url != "") && ((document.reg_fr.weburl.value.indexOf(".")==-1) ||(document.reg_fr.weburl.value.indexOf(":")==-1) ||(document.reg_fr.weburl.value.indexOf("http://")==-1)))
	{
		alert	("Please enter a valid web address.");
		window.reg_fr.weburl.focus();
		return false;
	}
	return true;
}

function focus_name()
{
		document.reg_fr.name.focus();
}
function focus_web()
{
		document.reg_fr.webtitle.focus();
}
function focuss()
{
		document.search_fr.key.focus();
}
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit)
		field.value = field.value.substring(0, maxlimit);
	else 
	countfield.value = maxlimit - field.value.length;
}
