function trim(str){var str=str.replace(/^\s\s*/,''),ws=/\s/,i=str.length;while (ws.test(str.charAt(--i)));return str.slice(0, i + 1);}	
function isnull(str){if(trim(str)==null||trim(str)==""){return true;}else{return false;}}
function validEmail(str){apos=str.indexOf("@");dotpos=str.lastIndexOf(".");if (apos<1||dotpos-apos<2){return false;}else{return true;}} 	
function showHide(id){$("#"+id).toggle("slow");}