<!--

function findInCommaSeparatedString(obj, commaSepString)
{
	var bReturnValue= false;
	var tArray = commaSepString.split(", ");
	var tArray2;
	
	for(j=0; j<tArray.length;j++)
	{
		tArray2 = tArray[j].split(":");
		if(tArray2[0]==obj)
		{
			bReturnValue = true;
		} 
	}
	return bReturnValue;
}


function fixString(obj)
{
	var objLength = obj.length;
	var tmpObj = obj.lastIndexOf("0", 0);
	
	if (tmpObj==0)
		obj = obj.slice(1,objLength);
	return obj;
}

	
function formatNumber(amount) {
// returns the amount in the .99 format
	amount = String(amount);
	amount = amount.replace(/,/,".");
    amount -= 0;
    amount = (Math.round(amount*100))/100;
	return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
}


function formatNumber2(amount)
{
	amount = String(amount);
    return amount.replace(/\./,",");
}



function formatNumber3(amount)
{
	amount = String(amount);
    return amount.replace(/,/,".");
}

function str_split(arr, str, delim)
{
	var pos = 0;
	var num = 0;
	var start = 0;
	
	while (pos < str.length)
	{
		while((str.substring (pos, pos+1) != delim) && (pos < str.length))
		{
			pos++;
		}
		arr[num] = str.substring(start,pos);
		num++;
		start = pos+1;
		pos++;
	}
}

function checkPassword(theForm)
{
if (theForm.Password.value.length < 5)
{
alert("Please enter at least 5 characters in the \"Password\" field.");
theForm.Password.focus();
return (false);
}

// check if both password fields are the same
if (theForm.Password.value != theForm.Password2.value)
{
	alert("The two passwords are not the same.");
	theForm.Password2.focus();
	return (false);
}
}

function cc()
{
 /* check for a cookie */
  if (document.cookie == "") 
  {
    /* if a cookie is not found - alert user -
     change cookieexists field value to false */
		alert("COOKIES need to be enabled!");
		document.location.href="cookies.asp?cid=<%=userId%>&langId=<%=langId%>";

    /* If the user has Cookies disabled an alert will let him know 
        that cookies need to be enabled to log on.*/ 

   // document.Form1.cookieexists.value ="false"  
  } else {
   /* this sets the value to true and nothing else will happen,
       the user will be able to log on*/
  //  document.Form1.cookieexists.value ="true"
  }
}

/* Set a cookie to be sure that one exists.
   Note that this is outside the function*/
//document.cookie = 'killme' + escape('nothing')
// -->

// -->

