﻿//Create Image
function htmlcontrol()
{
//Do Nothing
}

htmlcontrol.prototype.create_simple_img=function(src,title)
{
 if (! title)
  return '<img src="'+src+'" border="0" align="absmiddle">'
  else
  return '<img title="'+title+'" src="'+src+'" border="0" align="absmiddle">'
}

htmlcontrol.prototype.ImgClass=function(src,title,Class)
{

  return '<img title="'+title+'" src="'+src+'" class="'+ Class +'" border="0" 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.Links=function(title,href,id,overtitle,Class,Style,Target)
{

  return '<a title="'+overtitle+'" Class="'+ Class +'" style="'+ Style +'" target="'+ Target +'" 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)
{

 return '<select class="'+css+'" id="'+id+'" ></select>'

}






htmlcontrol.prototype.addElement = function(Parent, chiledID, ELM) {

    this.newel = document.createElement(ELM);
    this.newel.id = chiledID;
    
    Parent.appendChild(this.newel);
    

}


htmlcontrol.prototype.removeElement = function(Parent, chiled)
{
    Parent.removeChild(chiled);
}

