 function loader(){
//tag=document.getElementsByTagName('body')
//document.getElementsById(tag[0].id).id='body';

var filename=getFileName(location.href);

fid=getformid(filename)
//alert('fid  '+fid)
idstr=trim(fid).split(';')
var val='';
//alert('fid length  '+idstr.length)
for (num1 = 0; num1 < idstr.length; num1++)
{
getformtips((idstr[num1]))
if(val=='')
{
val+='#'+idstr[num1]+' *'
}else{
	val+=',#'+idstr[num1]+' *'
	}
}

//var val='#'+fid+' *';

return val;
};




function getFileName(path){

str=path.split('/');
path=str[str.length - 1]
str1=path.split('?');
//var fn = path.match(/\/([a-z0-9_-]+\.\w+)/i);
return str1[0];

}

function getformid(filename)
{
	//alert('ajax start')
	valu=$.ajax({
   type: "POST",
  
   url: "formtooltips.php",
    data: "name="+filename,
	async: false
  
 });

	
	//valu=$.ajax("formtooltips.php", { name: filename },function(data){alert('1data  '+data)});
	//alert('1valu:  '+valu.responseText);
	return valu.responseText;
	
	
}

function getformtips(ids)
{
	
	//alert('ids  '+ids)
	fvalu=$.ajax({
   type: "POST",
  
   url: "formtooltips.php",
    data: 'name='+ids+'&type=elements',
	async: false
  
 }).responseText;
	//fvalu=$.get("formtooltips.php", { name: ids ,type:'elements'}).responseText;
	//alert('fvalu:  '+fvalu);
	//alert(fvalu)
	//alert(trim(fvalu))
	svalu=(trim(fvalu)).split('~^~')
	//alert(svalu.length)
	for (num = 0; num < svalu.length; num++)
	{
	eidtip=svalu[num].split('~!~')
	//alert(eidtip[0]+"  "+eidtip[1])
	eleid=eidtip[0]
	$(eleid).css("title",eidtip[1]);
	if(document.getElementById(eleid)){
		
	document.getElementById(eleid).title=eidtip[1]
	}
	
	}
	
}
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}


	
	