function left(mainStr,lngLen)
{
if (lngLen>0)
{
return mainStr.substring(0,lngLen) 
}
else
{
return null
}
}