
function strTrim(tmpStr)
{
	var i;
	for (i=0; i < tmpStr.length; ++i)
		if (tmpStr.charAt(i) != " ") break;
	tmpStr = tmpStr.substring(i);
	for (i=tmpStr.length - 1; i >= 0; --i)
		if (tmpStr.charAt(i) != " ") break;
	tmpStr = tmpStr.substring(0, i + 1);
	return tmpStr;
}

function checkSplCharExceptHyphen(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9") || (tmpStr.charAt(i) == "-"))
       ) return true;
    return false;
}
function checkSplCharExceptBlank(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		||  (tmpStr.charAt(i) == " ") 
		)) return true;
    return false;
}
function checkSplCharForEmail(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		||  (tmpStr.charAt(i) == "_") || (tmpStr.charAt(i) == "-")
		|| (tmpStr.charAt(i) == ".") || (tmpStr.charAt(i) == "@") 
		)) return true;
    return false;
}

function checkSplCharForBlank(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		
		)) return true;
    return false;
}



function checkSplChar(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		|| (tmpStr.charAt(i) == "-") || (tmpStr.charAt(i) == "(")
		||(tmpStr.charAt(i) == ")")  || (tmpStr.charAt(i)==" ")		
)) return true;
    return false;
}
function checkSplChar1(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z")
		|| (tmpStr.charAt(i) == " ")
		
)) return true;
    return false;
}

function checkSplChar2(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		
)) return true;
    return false;
}

function checkSplChar3(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		|| (tmpStr.charAt(i) == "-") 
)) return true;
    return false;
}

function checkSplChar4(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		|| (tmpStr.charAt(i) == "-") || (tmpStr.charAt(i) == "_")
		||(tmpStr.charAt(i) == ".") 
)) return true;
    return false;
}

function checkSplChar5(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z") 
		|| (tmpStr.charAt(i) >= "0" && tmpStr.charAt(i) <= "9")
		|| (tmpStr.charAt(i) == "-") || (tmpStr.charAt(i) == "_")
		||(tmpStr.charAt(i) == ".") || (tmpStr.charAt(i) == "/")
		||(tmpStr.charAt(i) == ":")
		
)) return true;
    return false;
}

function checkSplChar7(tmpStr)
{
    var i = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (!((tmpStr.charAt(i) >= "A" && tmpStr.charAt(i) <= "Z") 
		|| (tmpStr.charAt(i) >= "a" && tmpStr.charAt(i) <= "z")
		|| (tmpStr.charAt(i) == ",") || (tmpStr.charAt(i) == "'")
		
)) return true;
    return false;
}
function checkEmail(tmpStr)
{
    var i = 0, count = 0;
    for (i = 0; i < tmpStr.length; ++i)
	if (tmpStr.charAt(i) == "@") count++;
    if (count == 1) return true;
    else return false;
}

