function KillSpace(x){
while((x.length>0) && (x.charAt(0)==' '))
{
x = x.substring(1,x.length);
}
for (i=0;i<x.length;i++)
{
if (x.charAt(i)==' ')
{
x = x.substring(0,i)
}
}
alert("i"+x+"i");
}
String.prototype.trim = function()
{
return this.replace(/(^/s+)|/s+$/g,"");
}