<!---  This section used for element Creation  --->	
	function addSpaces(node)
	{
		var temp = document.createElement('br')
		node.appendChild(temp);
	}
	
	function addSpan( spanStyle )
	{
		var spanNode = document.createElement("span");
		
		if ((!document.all)&&(document.getElementById)){
			spanNode.setAttribute("style",spanStyle);
		}    
		//workaround for IE 5.x
		if ((document.all)&&(document.getElementById)){
			spanNode.style.setAttribute('cssText', spanStyle);
		}
		
		return spanNode;
	}
	
	function addTextField(name,maxLen,textsize, defaultText, node)
	{
		temp = document.createElement('input');
		temp.setAttribute('Type', 'text');
		temp.setAttribute('id', name);
		temp.setAttribute('name',name);
		temp.setAttribute('value',defaultText);
		temp.maxLength = maxLen;
		temp.setAttribute('size',textsize);
		node.appendChild(temp);
	}
	
	function addTextFieldWithOnChange(name,maxLen,textsize, defaultText, functionCall, node)
	{
		temp = document.createElement('input');
		temp.setAttribute('Type', 'text');
		temp.setAttribute('id', name);
		temp.setAttribute('name',name);
		temp.setAttribute('value',defaultText);
		temp.maxLength = maxLen;
		temp.setAttribute('size',textsize);
		
		if(functionCall != "")
		{
			if ((!document.all)&&(document.getElementById)){
			   temp.setAttribute("onkeyup",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				temp["onkeyup"]=new Function(functionCall);
			}
		}
		
		node.appendChild(temp);
	}
	
	function addText(TextValue, node)
	{
		temp = document.createTextNode(TextValue)
		node.appendChild(temp);
	}
	
	function addTextArea(textAreaName, rows, cols, node)
	{	
		var temp = document.createElement('textarea');
		temp.setAttribute('id', textAreaName);
		temp.setAttribute('name',textAreaName);
		temp.setAttribute('rows', rows);
		temp.setAttribute('cols', cols);
		node.appendChild(temp);
	}
	
	function addSelectBox(NodeID)
	{	
		var temp = document.createElement('select');
		temp.setAttribute('id', NodeID);
		temp.setAttribute('name',NodeID);
		
		return temp;
	}
	
	function addSelectBoxOptions(NodeValue, nodeText, node, selectYes)
	{	
		var temp = document.createElement('option');
		temp.setAttribute('value', NodeValue);
		if(selectYes == 1)
		{
			temp.setAttribute('selected', 'selected');
		}
		temp.innerHTML = nodeText;
		
		node.appendChild(temp);
	}
	
	
	function addHyperLink( hyperlink, Text, functionCall, fontStyle, node)
	{
		var myLink = document.createElement('a');
		myLink.setAttribute("href",hyperlink);
		addText(Text,myLink);
		myLink.innerText = Text;

		if(functionCall != "")
		{
			if ((!document.all)&&(document.getElementById)){
			   myLink.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				myLink["onclick"]=new Function(functionCall);
			}
		}
		
		if ((!document.all)&&(document.getElementById)){
			myLink.setAttribute("style",fontStyle);
		}    
		//workaround for IE 5.x
		if ((document.all)&&(document.getElementById)){
			myLink.style.setAttribute('cssText', fontStyle);
		}
		
		node.appendChild(myLink);
	}
	
	function addEmptyHyperLink( hyperlink, functionCall)
	{
		var myLink = document.createElement('a');
		myLink.setAttribute("href",hyperlink);
		//addText(Text,myLink);
		//myLink.innerText = Text;

		if(functionCall != "")
		{
			if ((!document.all)&&(document.getElementById)){
			   myLink.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				myLink["onclick"]=new Function(functionCall);
			}
		}
		
		return myLink;
	}
	
	function addCheckBox(checkID,checkName, node, value, functionCall)
	{
		var temp = document.createElement('input');
		temp.setAttribute('type', 'checkbox');
		temp.setAttribute('id',checkID);
		temp.setAttribute('name',checkName);
		temp.setAttribute('value', value);
		
		if(functionCall != "")
		{
			if ((!document.all)&&(document.getElementById)){
			   temp.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				temp["onclick"]=new Function(functionCall);
			}
		}
		
		node.appendChild(temp);
	}
	
	
	function addHiddenField(ID, Name, value)
	{
		var temp = document.createElement('input');
		temp.setAttribute('type', 'hidden');
		temp.setAttribute('id',ID);
		temp.setAttribute('name',Name);
		temp.setAttribute('value', value);
		
		return temp;
	}
	
	function addImage( image, altName, imgStyle, node,functionCall)
	{
		var imgNode=document.createElement("img");
			imgNode.setAttribute('src', image);
			imgNode.setAttribute('alt', altName);
			if ((!document.all)&&(document.getElementById)){
				imgNode.setAttribute("style",imgStyle);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				imgNode.style.setAttribute('cssText', imgStyle);
			}
			if ((!document.all)&&(document.getElementById)){
			   imgNode.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				imgNode["onclick"]=new Function(functionCall);
			}
			
			node.appendChild(imgNode);
	}
	
	function addImageNoNode( image, altName, imgStyle)
	{
		var imgNode=document.createElement("img");
			imgNode.setAttribute('src', image);
			imgNode.setAttribute('alt', altName);
		if ((!document.all)&&(document.getElementById)){
			imgNode.setAttribute("style",imgStyle);
		}    
		//workaround for IE 5.x
		if ((document.all)&&(document.getElementById)){
			imgNode.style.setAttribute('cssText', imgStyle);
		}
		
		return imgNode;
	}	
	
	
	function addInputImage(functionCall,imgSrc,node,imgHeight,imgWidth,imgAlt)
	{
		var button = document.createElement('input');
			button.setAttribute('type', 'image');
			button.setAttribute("src",imgSrc);
			if ((!document.all)&&(document.getElementById)){
			   button.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				button["onclick"]=new Function(functionCall);
			}
			button.setAttribute('height',imgHeight);
			button.setAttribute('width',imgWidth);
			button.setAttribute('alt',imgAlt);
				
			node.appendChild(button);
	}
	
	function addInputNoImage(functionCall,value, node)
	{
		var button = document.createElement('input');
			button.setAttribute('type', 'button');
			if ((!document.all)&&(document.getElementById)){
			   button.setAttribute("onclick",functionCall);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				button["onclick"]=new Function(functionCall);
			}
			button.setAttribute('value',value);
				
			node.appendChild(button);
	}
	
	function addSubmitButton(functionCall,value, node)
	{
		var button = document.createElement('input');
			button.setAttribute('type', 'button');
			if(functionCall != '')
			{
				if ((!document.all)&&(document.getElementById)){
				   button.setAttribute("onclick",functionCall);
				}    
				//workaround for IE 5.x
				if ((document.all)&&(document.getElementById)){
					button["onclick"]=new Function(functionCall);
				}
			}
			button.setAttribute('value',value);
				
			node.appendChild(button);
	}
	
	function addDiv(id,divStyle)
	{
		var divNode = document.createElement("div");
		divNode.setAttribute("id",id);
		
		if ((!document.all)&&(document.getElementById)){
			divNode.setAttribute("style",divStyle);
		}    
		//workaround for IE 5.x
		if ((document.all)&&(document.getElementById)){
			divNode.style.setAttribute('cssText', divStyle);
		}
		return divNode;
	}
	
	function addDivNoNode(id,divStyle)
	{
		var divNode = document.createElement("div");
		divNode.setAttribute("id",id);
		
		if ((!document.all)&&(document.getElementById)){
			divNode.setAttribute("style",divStyle);
		}    
		//workaround for IE 5.x
		if ((document.all)&&(document.getElementById)){
			divNode.style.setAttribute('cssText', divStyle);
		}
		return divNode;
	}
	
	function addTable( tableStyle )
	{
		var tableNode = document.createElement("table");
		if(tableStyle != '')
		{
			if ((!document.all)&&(document.getElementById)){
				tableNode.setAttribute("style",tableStyle);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				tableNode.style.setAttribute('cssText', tableStyle);
			}
		}
		return tableNode;
	}
	
	function addTablebody( tableStyle )
	{
		var bodyNode = document.createElement("tbody");
		if(bodyNode != '')
		{
			if ((!document.all)&&(document.getElementById)){
				bodyNode.setAttribute("style",tableStyle);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				bodyNode.style.setAttribute('cssText', tableStyle);
			}
		}
		return bodyNode;
	}
	
	function addTablerow( rowStyle )
	{
		var rowNode = document.createElement("tr");
		if(rowStyle != '')
		{
			if ((!document.all)&&(document.getElementById)){
				rowNode.setAttribute("style",rowStyle);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				rowNode.style.setAttribute('cssText', rowStyle);
			}
		}
		return rowNode;
	}
	function addTableCell( cellStyle )
	{
		var cellNode = document.createElement("td");
		if(cellStyle != '')
		{
			if ((!document.all)&&(document.getElementById)){
				cellNode.setAttribute("style",cellStyle);
			}    
			//workaround for IE 5.x
			if ((document.all)&&(document.getElementById)){
				cellNode.style.setAttribute('cssText', cellStyle);
			}
		}
		return cellNode;
	}
<!---  End of Element Creation Section  --->	

