// function for checking string

function checkString(str_temp, str_fld)

{

	temp=new String(str_temp);

	if(str_temp=="")

	{

		window.alert("Please enter the " + str_fld);

		return false;

	}

	

	if(temp.charAt(0)==" ")

	{

		window.alert("The " + str_fld + " cannot start with a space");

		return false;

	}

	

	str=new String("'\"");

	

	var flag=1;

	

	for (c=0; c<temp.length; c++)

	{

		if(str.indexOf(temp.charAt(c))>=0)

		{

			flag=0;

			break;

		}

	}

	

//	if (flag==0)

	// {

		// window.alert("The " + str_fld + " cannot contain single/double quotes");

		// return false;

	// }

	return true;

}



// function for checking number

function checkNumber(str_temp, str_fld)

{

	temp=new String(str_temp);

	if(str_temp=="")

	{

		window.alert("Please enter the " + str_fld);

		return false;

	}

	

	if(temp.charAt(0)==" ")

	{

		window.alert("The " + str_fld + " cannot start with a space");

		return false;

	}

	

	if (isNaN(str_temp))

	{

		window.alert("The " + str_fld + " can contain only numbers");

		return false;

	}

	return true;

}



// returns the filename(Thumbnail/Blowup name)

function cstring(str1,str2)

{

	temp1=new String(str1);

	temp2=new String(str2);

	if(temp1==temp2)

	{

		window.alert("The new passwords do not match.  Please enter again.");

		return false;

	}

	return true;

}