				function AddItemInList(FormName,List, itemID , itemText)
				{
				    eval('document.'+FormName+'.'+List+'.options[document.'+FormName+'.'+List+'.options.length]=new Option(\''+itemText+'\',\''+itemID+'\')');
				}	
                
				function AddPagesFromList(FormName,List1,List2)
   				{
   					//Checking if some value is selected
   					
   					
   					if(!eval(FormName+'.'+List2+'.value')=="")
   					{	  
						 	 
							 
							 
  						//Checking if selected value already exists in the list
   						var ItemExistsInList = false
						for (var i=eval('document.'+FormName+'.'+List1+'.options.length')-1; i>=0; i--)
						{
				    		if(eval('document.'+FormName+'.'+List1+'.options['+i+'].value=='+FormName+'.'+List2+'.value'))
				    		{
				    			ItemExistsInList = true
								//alert("User already exist in the list")
								//Removing added item from first list
  							//	eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
				    		}
  						}		
  											
	  					if(!ItemExistsInList==true)
	  					{
	  						//Item doesnt exist in list
	  						var text = eval(FormName +'.'+ List2+'.options['+FormName+'.'+ List2+'.selectedIndex].text');
	  						eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option(\''+text+'\','+FormName+'.'+List2+'.value)');
							//eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option('+FormName+'.'+List2+'.value,'+FormName+'.'+List2+'.value)');
	  						//Removing added item from first list
	  						eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
	  					}
		    		}
		    		else
		    		{
						alert("Please select a item to add to list")}
				
		        	}
		        	function AddPagesFromList1(FormName,List1,List2)
   					{
   				 
   					
   					
   					if(!eval(FormName+'.'+List2+'.value')=="")
   					{	  
						 	 
						if(eval(FormName+'.'+List2+'.value')!="-1") 
						{
							
							 
							//Checking if selected value already exists in the list
							var ItemExistsInList = false
							for (var i=eval('document.'+FormName+'.'+List1+'.options.length')-1; i>=0; i--)
							{
								if(eval('document.'+FormName+'.'+List1+'.options['+i+'].value=='+FormName+'.'+List2+'.value'))
								{
									ItemExistsInList = true
									//alert("User already exist in the list")
									//Removing added item from first list
								//	eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
								}
							}		
  											
							if(!ItemExistsInList==true)
							{
								//Item doesnt exist in list
								var text = eval(FormName +'.'+ List2+'.options['+FormName+'.'+ List2+'.selectedIndex].text');
								eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option(\''+text+'\','+FormName+'.'+List2+'.value)');
								//eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option('+FormName+'.'+List2+'.value,'+FormName+'.'+List2+'.value)');
								//Removing added item from first list
								eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
							}
							
						}
						
						else
						{
							
						alert("You cannot select table name.")	
						}
							
		    		}
		    		else
		    		{
						alert("Please select a item to add to list")}
				
		        	}
				
   				function AddAllPagesToList(FormName,List1,List2)
   				{
				
					for (var j=eval('document.'+FormName+'.'+List2+'.options.length')-1; j>=0; j--)
   					{
   						eval(FormName+'.'+List2+'.options['+j+'].selected=true')
   						
	   					//Checking if some value is selected
   						if(!eval(FormName+'.'+List2+'.value')=="")
   						{	                  				
  							//Checking if selected value already exists in the list
   							var ItemExistsInList = false
							for (var i=eval('document.'+FormName+'.'+List1+'.options.length')-1; i>=0; i--)
							{
					    		if(eval('document.'+FormName+'.'+List1+'.options['+i+'].value=='+FormName+'.'+List2+'.value'))
					    		{
					    			ItemExistsInList = true
									//Removing added item from first list
  									//eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
					    		}
	  						}		
  											
		  					if(!ItemExistsInList==true)
	  						{
	  							//Item doesnt exist in list
	  						var text = eval(FormName +'.'+ List2+'.options['+FormName+'.'+ List2+'.selectedIndex].text');
	  						eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option(\''+text+'\','+FormName+'.'+List2+'.value)');
	  							//eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.options.length]=new Option('+FormName+'.'+List2+'.value,'+FormName+'.'+List2+'.value)');
	  							//Removing added item from first list
	  							eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.selectedIndex]=null');
		  					}
			    		}
					}
					
//		    		DisplayListCount();
		        }
	                
				function RemoveAllPagesFromList(FormName,List1,List2)
				{
					
   					for (var j=eval('document.'+FormName+'.'+List1+'.options.length')-1; j>=0; j--)
   					{
   						eval(FormName+'.'+List1+'.options['+j+'].selected=true')
   						
						//Checking if some value is selected
						if(!eval(FormName+'.'+List1+'.value')=="")
						{	                  				
							//Checking if selected value already exists in the list
							var ItemExistsInList = false
							for (var i=eval('document.'+FormName+'.'+List2+'.options.length')-1; i>=0; i--)
							{
					    		if(eval('document.'+FormName+'.'+List2+'.options['+i+'].value=='+FormName+'.'+List1+'.value'))
					    		{
					    			ItemExistsInList = true
									//Removing added item from first list
		  							eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.selectedIndex]=null');
					    		}
		  					}		
	  								
		  					if(!ItemExistsInList==true)
		  					{
		  						//Item doesnt exist in list
	  						var text = eval(FormName +'.'+ List1+'.options['+FormName+'.'+ List1+'.selectedIndex].text');
	  						eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.options.length]=new Option(\''+text+'\','+FormName+'.'+List1+'.value)');
		  						//eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.options.length]=new Option('+FormName+'.'+List1+'.value,'+FormName+'.'+List1+'.value)');
	  							//Removing added item from first list
		  						eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.selectedIndex]=null');
		  					}
			    		}
			    	}
//		         	DisplayListCount();
				}
  				
				function RemovePagesFromList(FormName,List1,List2)
				{
					
					//Checking if some value is selected
					if(!eval(FormName+'.'+List1+'.value')=="")
					{	                  				
						//Checking if selected value already exists in the list
						var ItemExistsInList = false
						for (var i=eval('document.'+FormName+'.'+List2+'.options.length')-1; i>=0; i--)
						{
				    		if(eval('document.'+FormName+'.'+List2+'.options['+i+'].value=='+FormName+'.'+List1+'.value'))
				    		{
				    			ItemExistsInList = true
								//Removing added item from first list
	  							eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.selectedIndex]=null');
				    		}
	  					}		
	  								
	  					if(!ItemExistsInList==true)
	  					{
	  						//Item doesnt exist in list
	  						var text = eval(FormName +'.'+ List1+'.options['+FormName+'.'+ List1+'.selectedIndex].text');
	  						eval('document.'+FormName+'.'+List2+'.options[document.'+FormName+'.'+List2+'.options.length]=new Option(\''+text+'\','+FormName+'.'+List1+'.value)');
  							//Removing added item from first list
	  						eval('document.'+FormName+'.'+List1+'.options[document.'+FormName+'.'+List1+'.selectedIndex]=null');
	  					}
		    		}
		    		else
		    		{alert("Please select an item to remove from the selected list")}
				}
				
				function SelectAllItemsInList(FormName,ListName,Hidename)
				{
					if (eval('document.'+FormName+'.'+ListName+'.options.length')==0 )
						{
						}
						
					else
					{
								for (var i=eval('document.'+FormName+'.'+ListName+'.options.length')-1; i>=0; i--)
								{
									
									eval('document.'+FormName+'.'+ListName+'.options['+i+'].selected=true')
									
									if(eval('document.'+FormName+'.'+Hidename+'.value') == "")
									{
										eval('document.'+FormName+'.'+Hidename+'.value = document.'+FormName+'.'+ListName+'.options['+i+'].value')
									}
									else
									{
										var t= eval('document.'+FormName+'.'+Hidename+'.value = document.'+FormName+'.'+Hidename+'.value +  "," + document.'+FormName+'.'+ListName+'.options['+i+'].value')
									}
								}	
					
					}				
				}/////////// end of function
