
function specialchars1(fieldname)
{

	var charcheck;
	var isnotsp="!#*"	;
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
                // alert(isnotsp.charAt(j));
				return false;
				alert("you cant");
			}
			
	    }
		
	}
	
	return true;
	
}

function isempty(fieldname)
{
if (fieldname.value == "") {
        //alert("You must enter a fistname");
        //remainder1.fieldname.focus()
        return true;
	 }
}

function specialcharstitle(fieldname)
{
	var charcheck;
	var isnotsp="!@#$^*()_+=-'`~\|]}[{;:/?,<>&%"	;
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
//				alert(isnotsp.charAt(j));
				return false;
			}
	    }
	}
	return true;
}

function specialchars2(fieldname)
{
	var charcheck;
	var isnotsp="!^*+=`~|;:/&"	;
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
//				alert(isnotsp.charAt(j));
				return false;
			}
	    }
	}
	return true;
}
function specialcharslname(fieldname)
{
	var charcheck;
	var isnotsp="!@#$^*()_+=-`\|]}[{;:/?,<>&%0123456789";
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
//				alert(isnotsp.charAt(j));
				return false;
			}
	    }
	}
	return true;
}

//function for special characters in cost to pognet & cost of shippng fields.
function specialcharsprice(fieldname)
{
	var charcheck;
	var isnotsp="!@#$%^&*()_-+=|\{[}]:;'><,?/~`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
//				alert(isnotsp.charAt(j));
				return false;
			}
	    }
	}
	return true;
}

// Function Name:			trimstr()
// Input Parameter:			Input String, Object Value
// Input Parameter Type:	Text, Text, Object
// Function Purpose:		Mentioned below
//							
function trimstr(strin,obj)
{
	var i,j;
    
//	This loop checks whether a field is containing white spaces only & gives error appropriately
	for(i=0;((i < strin.length) && (strin.charAt(i) == ' ')); i++);
	if (i == strin.length) 
	{
		obj.focus();
		return -1;
	}

//	This loop truncates the input string if it contains in-between 
//	white spaces. e.g. if string 'strin' contains "amod deshpande"
//  then output will be "amod"

/*
	strin1 = "";
	for(j=0;j<strin.length && strin.charAt(i) != ' ' && strin.charAt(i) != "";j++,i++)
	{
		strin1 += strin.charAt(i);
	}
	obj.value = strin1;
	return 0;
*/
}
function check(fieldname)
{

if(specialchars(fieldname))
return true;
else
{
//alert("you can't enter spacial character");
//fieldname.value=" ";
//fieldname.focus();
return false;
}
}

function CheckEmpty (fieldname) 
{

	var a;
	a = fieldname.value;
	if (!a.length > 0) {
		//fieldname.focus();
		return false;
	}
	else
		return true ;
}

function isNumber(inputStr) {
for (var i = 0; i < inputStr.length; i++) {
var oneChar = inputStr.substring(i, i + 1)
if (oneChar < "0" || oneChar > "9") {
return false
}
}
return true
}
function specialchars(fieldname)
{

	var charcheck;
	var isnotsp="!@$^#_+='`~\|]}[{;:/?<>%";
	charcheck=fieldname.value;
  
	for(i=0;i<charcheck.length;i++)
	{
		for(j=0;j<isnotsp.length;j++)
    	{
			if(charcheck.charAt(i)== isnotsp.charAt(j))
			{
                // alert(isnotsp.charAt(j));
				return false;
				
				}
			
	    }
		
	}
	
	return true;
	}