﻿//Create Image
function htmlcontrol()
{
//Do Nothing
}

htmlcontrol.prototype.img=function(src,title,id,css,events)
{

  return '<img title="'+title+'" id="'+id+'" src="'+src+'" class="'+css+'" border="0" '+events+' align="absmiddle">'
}

htmlcontrol.prototype.createlinks=function(title,href,id,overtitle)
{
if (! overtitle)
  return '<a href="'+href+'"  id="'+ id +'">'+title+'</a>'
  else
  return '<a title="'+overtitle+'" href="'+href+'"  id="'+ id +'">'+title+'</a>'
}

htmlcontrol.prototype.createfiled=function(type,value,id,size)
{

  return '<input type="'+type+'" value="'+value+'" id="'+id+'" size="'+size+'">'

}



htmlcontrol.prototype.createfiledwithevent=function(type,value,id,size,events,css)
{

  return '<input type="'+type+'" value="'+value+'" id="'+id+'" size="'+size+'" class="'+css+'"  '+events+'>'

}




htmlcontrol.prototype.createcheckbox=function(title,id,name,value,checked,events)
{
  return '<input type="checkbox"  title="'+title+'" '+checked+' id="'+id+'"  name="'+name+'" value="'+value+'" '+events+'>';
}

htmlcontrol.prototype.createdropdownlist=function(id,css,Event)
{
 return '<select class="'+css+'" id="'+id+'" '+Event+'></select>'

}






htmlcontrol.prototype.addElement=function(parentID,chiledID,ELM)
{
  
  this.newel = document.createElement(ELM);
  this.newel.id=chiledID
  $(parentID).appendChild(this.newel);


}


htmlcontrol.prototype.removeElement=function(parentID,chiledID)
{
  $(parentID).removeChild($(chiledID));
}


