	var URL 	= "";
	var AuthCode 	= "";
	URL="66.213.208.220";
	URL=location.host;
	//AuthCode 	="JBwrjvF/G53Q3PCyHxcPMA==";
	function FillSetSelect()
	{
		

		//URL = location.host;
		//URL="66.213.208.220";

		SetConstants('http://'+URL+'/dsmo/lb.asmx',URL+'/dsmo',false);
		//alert (URL);


//*******************************************************************************************************************************************************************
		//AuthCode = GetAuthenticationCode("UName", "PWD");
		AuthCode = GetAuthenticationCode("su", "su");
		 	// if you plan to use username based authentication, replace the values here with
									// proper username and password
									// please keep in mind, that this method allows skilled Users to retrieve this username
									// and password from anywhere in the world since this code is not protected.
//		AuthCode="JBwrjvF/G53Q3PCyHxcPMA=="			// It is indead wiser to use an Authentication Code here just replace the string below with
									// any valid Authentication code from DSMO
									// (You can find a users valid Authentication Code in the user section of the DSMO Frontend)
//*******************************************************************************************************************************************************************
		//alert(AuthCode);
		FillAliasArray(GetAvailableSetListAuth(AuthCode));
		//FillAliasArray(GetAvailableSetListAuth("JBwrjvF/G53Q3PCyHxcPMA=="));
		for(var i=0;i<AliasArray.length;i++)
		{
		//	document.form1.SetNameField.options[i]=new Option(AliasArray[i], i);
		//	document.form1.SetNameField.options[i].title=AliasArray[i];
		}

		for(var i=0;i< AliasArray.length;i=i+1)
		{

			var l = document.createElement("a");
			var m = document.createElement("a");
			var n = document.createElement("a");
			var o = document.createElement("a");


			
			imgDisplay = new Image();
			imgDisplay1 = new Image();
			imgDisplay2 = new Image();
			imgDisplay3 = new Image();

			tabBody=document.getElementsByTagName("TBody").item(1);

			row=document.createElement("TR");
			cell1 = document.createElement("TD");
			cell2 = document.createElement("TD");
			cell3 = document.createElement("TD");
			cell4 = document.createElement("TD");

			//Blank space

			cell5 = document.createElement("TD");
			cell6 = document.createElement("TD");
			cell7 = document.createElement("TD");

			//alert(i);
			imgDisplay.border="1";
			imgDisplay.src="http://"+URL+"/dsmo/streamimage.aspx?sa=" + AliasArray[i] + "&t=" + document.getElementById('name').value.substr(0, 50) + "&ac="+AuthCode+"&pw="+50;
			l.setAttribute("href", "javascript:fnDisplay('"+AliasArray[i]+"');");
			l.setAttribute("display", "none");
			textnode1=imgDisplay;

		//	i=i+1;
			if (i+1 < AliasArray.length)
			{
		//	alert(i)
			imgDisplay1.border="1";
			imgDisplay1.src="http://"+URL+"/dsmo/streamimage.aspx?sa=" + AliasArray[i+1] + "&t=" + document.getElementById('name').value.substr(0, 50) + "&ac="+AuthCode+"&pw="+50;
			m.setAttribute("href", "javascript:fnDisplay('"+AliasArray[i+1]+"');");
			m.setAttribute("display", "none");
			textnode2=imgDisplay1;
			}

			l.appendChild(textnode1);
			cell1.appendChild(l);
			row.appendChild(cell1);



			cell5.innerHTML="&nbsp;&nbsp;&nbsp;";
			row.appendChild(cell5);



			if (i+1 < AliasArray.length)
			{
				m.appendChild(textnode2);
				cell2.appendChild(m);
				row.appendChild(cell2);

				cell6.innerHTML="&nbsp;&nbsp;&nbsp;";
				row.appendChild(cell6);
			}



			//==3rd

		//	i=i+1;
			
			
			if (i+2 < AliasArray.length)
			{
			imgDisplay2.border="1";
			imgDisplay2.src="http://"+URL+"/dsmo/streamimage.aspx?sa=" + AliasArray[i+2] + "&t=" + document.getElementById('name').value.substr(0, 50) + "&ac="+AuthCode+"&pw="+50;
			n.setAttribute("href", "javascript:fnDisplay('"+AliasArray[i+2]+"');");
			n.setAttribute("display", "none");
			textnode3=imgDisplay2;
			}

			if (i+2 < AliasArray.length)
			{
				n.appendChild(textnode3);
				cell3.appendChild(n);
				row.appendChild(cell3);

				cell7.innerHTML="&nbsp;&nbsp;&nbsp;";
				row.appendChild(cell7);
			}




			//===end===




			//==4th

		//	i=i+1;
	/*		alert(i+3);
			alert(AliasArray.length);
			if (i+3 < AliasArray.length)
			{
			imgDisplay3.border="1";
			imgDisplay3.src="http://"+URL+"/dsmo/streamimage.aspx?sa=" + AliasArray[i+3] + "&t=" + document.getElementById('name').value.substr(0, 50) + "&ac="+AuthCode+"&pw="+50;
			o.setAttribute("href", "javascript:fnDisplay('"+AliasArray[i+3]+"');");
			o.setAttribute("display", "none");
			textnode4=imgDisplay3;
			}

			if (i+3 < AliasArray.length)
			{
				o.appendChild(textnode4);
				cell4.appendChild(o);
				row.appendChild(cell4);
			}
*/

			//===end===
			//row.appendchild("<br>");
			tabBody.appendChild(row);

			var tblRef = document.getElementById("tableRef");

			//var newRow = document.all("tableRef").insertRow();

			var newRow = tblRef.insertRow(-1);
			var oCell = newRow.insertCell(-1);
			oCell.innerHTML = "&nbsp;&nbsp;";
			i=i+2;
			tabBody.appendChild(newRow);

	}
}