 var ddmx = new DropDownMenuX('menu1');
    ddmx.delay.show = 0;
    ddmx.delay.hide = 400;
    ddmx.position.levelX.left = 2;
    ddmx.init();
    
	var browserName = "";
		var ua = navigator.userAgent.toLowerCase();
		if ( ua.indexOf( "opera" ) != -1 ) 
		{
			browserName = "opera";
			
		}
		else
			if(ua.indexOf( "msie" ) != -1 ) 
			{
				browserName = "msie";
				
			}
			else
				if ( ua.indexOf( "safari" ) != -1 ) 
				{
					browserName = "safari";
					
				}
				else
					if ( ua.indexOf( "mozilla" ) != -1 ) 
					{
						if ( ua.indexOf( "firefox" ) != -1 ) 
						{
							browserName = "firefox";
														
						}
						else 
						{
							browserName = "mozilla";
							
							
						}
					}
	
	
	var body=document.getElementsByTagName("body")[0];

			var x=screen.width;
			var y=screen.height;
			
			//main table
			
			var tbmain=document.createElement("table");
			var tbodymain=document.createElement("tbody");
			var tmainrow=document.createElement("tr");
			var tmain1=document.createElement("td");
			
			
			
			
			//left table
			var tbleft=document.createElement("table");
			var tbodyleft=document.createElement("tbody");
			var cell4left= new Array(5);
			var row4left= new Array(5);






				// creating rows for the table

				for(var j=0;j<5;j++)
				{
					row4left[j]=document.createElement("tr");

					//creating td for table

					cell4left[j]=document.createElement("td");
				}





			var Imghome = document.createElement("img");

			if((screen.width==800) && (screen.height==600))
			{

				cell4left[0].setAttribute("width","100");

			}

			else
			{
				cell4left[0].setAttribute("width","180");
			}


			cell4left[0].setAttribute("height","100");
			cell4left[0].setAttribute("valign","top");



			cell4left[0].appendChild(Imghome);
			Imghome.setAttribute("src","image/home.gif");


			if((screen.width==800) && (screen.height==600))
			{
				Imghome.setAttribute("width","150");

			}

			else
			{
				Imghome.setAttribute("width","180");
				
				
			}
			
			
			
			Imghome.setAttribute("height","200");




			// table for user password window

			var tbuser=document.createElement("table");
			

			if((screen.width==1024)&&(screen.height==768))
			{
				tbuser.setAttribute("width","170");
			}
			var tbodyuser=document.createElement("tbody");
			var usercell= new Array(5);
			var userrow= new Array(5);


			//creating cell & row for user password table

			for(var j=0;j<5;j++)
				{
					userrow[j]=document.createElement("tr");

					//creating td for user table

					usercell[j]=document.createElement("td");
				}


			usercell[0].appendChild(document.createTextNode("User Name"));
			usercell[0].setAttribute("align","left");
			

			//defining textfield for user name input

			var unfield=document.createElement("input");
			unfield.setAttribute("type","text");
			unfield.setAttribute("name","uname");

			usercell[1].appendChild(unfield);


				//creating password label

			usercell[2].appendChild(document.createTextNode("Password"));
			usercell[2].setAttribute("align","left");



			//creating password field

			var passfield=document.createElement("input");
			passfield.setAttribute("type","password");
			passfield.setAttribute("name","upass");

			usercell[3].appendChild(passfield);




			// adding cell and rows to userrow (user login table's row)

			for(var i=0;i<4;i++)
			{
				userrow[i].appendChild(usercell[i]);
				tbodyuser.appendChild(userrow[i]);
			}


			//creating subtable of user table for fogot password and login button


			var logtable=document.createElement("table");

			if((screen.width==1024)&&(screen.height==768))
			{
				logtable.setAttribute("width","170");
			}



			var logbody=document.createElement("tbody");
			var logcell=new Array(2);
			var logrow=document.createElement("tr");

			//initialising td for logbuton table

			for(var i=0;i<2;i++)
			{

				logcell[i]=document.createElement("td");
				
				logrow.appendChild(logcell[i]);

			}



		/*	var passlink=document.createElement("a");
			passlink.setAttribute("href","for_pass.htm");
			passlink.appendChild(document.createTextNode("Forget Password ?"));
			var lfont=document.createElement("font");
			lfont.setAttribute("size","2");


			logcell[0].appendChild(lfont);
			logcell[0].setAttribute("align","left");
		*/
			var lbutton=document.createElement("input");
			lbutton.setAttribute("type","button");
			lbutton.setAttribute("name","act");
			lbutton.setAttribute("value","Login");
			lbutton.setAttribute("id","loginbutton");
			logcell[1].appendChild(lbutton);


			if((screen.width==800)&&(screen.height==600))
			{
				logcell[1].setAttribute("align","center");
			}

			else
			{
				logcell[1].setAttribute("align","right");
			}

			logbody.appendChild(logrow);
			logtable.appendChild(logbody);


			usercell[4].appendChild(logtable);
			userrow[4].appendChild(usercell[4]);
			tbodyuser.appendChild(userrow[4]);
			tbuser.appendChild(tbodyuser);


			tbuser.setAttribute("background","image/bg4table.jpg");


			cell4left[1].appendChild(tbuser);


			if((screen.width==800) && (screen.height==600))
				{
					cell4left[1].setAttribute("width","100");

				}

				else
				{
					cell4left[1].setAttribute("width","180");
				}



			// table for search frame...........................


			var stable=document.createElement("table");
			var stabbody=document.createElement("tbody");
			var scell=new Array(2);
			var srow=new Array(2);


			// creating and initialising table rows and columns


			for(var j=0;j<2;j++)
				{
					srow[j]=document.createElement("tr");

					//creating td for user table

					scell[j]=document.createElement("td");
				}

			var searchfield=document.createElement("input");
			searchfield.setAttribute("type","text");
			searchfield.setAttribute("name","stext");

			scell[0].appendChild(searchfield);

			//creating button for search option...........


			var searchbutt=document.createElement("input");
			searchbutt.setAttribute("type","button");
			searchbutt.setAttribute("name","act");
			searchbutt.setAttribute("value","Search");

			scell[1].appendChild(searchbutt);
			scell[1].setAttribute("align","right");
			if((screen.width==1024)&&(screen.height==768))
			{
				scell[1].setAttribute("width","170");
			}

			for(var i=0;i<2;i++)
			{
				srow[i].appendChild(scell[i]);
				stabbody.appendChild(srow[i]);
			}

			stable.appendChild(stabbody);
			stable.setAttribute("background","image/bg4table.jpg");

			cell4left[2].appendChild(stable);
			//adding cell to the row


			


				linktable=document.createElement("table");
			
				ltbody=document.createElement("tbody");
				ltrow1=document.createElement("tr");
				ltcell1=document.createElement("td");

				var bold=document.createElement("b");
				bold.appendChild(document.createTextNode("Related Links"));
				ltcell1.appendChild(bold);
				ltcell1.setAttribute("bgColor","#87CEFA");

				if((screen.width==800) && (screen.height==600))
				{
					ltcell1.setAttribute("width","150");
				}

				else
				{
					ltcell1.setAttribute("width","180");
				}
				ltcell1.setAttribute("align","center");
				ltrow1.appendChild(ltcell1);
				ltbody.appendChild(ltrow1);


				ltrow2=document.createElement("tr");
				ltcell2=document.createElement("td");

				var linklist=document.createElement("dl");

				var link1=document.createElement("dt");
				var lc1=document.createElement("a");
				//lc1.appendChild(document.createTextNode("NCDEX"));
				lc1.appendChild(document.createTextNode("  ."));
				link1.appendChild(lc1);
				//lc1.setAttribute("href","http://www.ncdex.com");
				var lfont1=document.createElement("font");
				lfont1.setAttribute("color","white");
				lfont1.appendChild(link1);


				var link2=document.createElement("dt");
				var lc2=document.createElement("a");
				//lc2.appendChild(document.createTextNode("MCX"));
				lc2.appendChild(document.createTextNode("  ."));
				//lc2.setAttribute("href","http://www.mcxindia.com");
				//link2.appendChild(lc2);
				var lfont2=document.createElement("font");
				lfont2.setAttribute("color","white");
				lfont2.appendChild(lc2);
				//lfont2.setAttribute("target","_self");


				var link3=document.createElement("dt");
				var lc3=document.createElement("a");
				lc3.appendChild(document.createTextNode("FAQ's"));
				lc3.setAttribute("href","main.htm#FAQ");
				lc3.setAttribute("target","_top");
				link3.appendChild(lc3);
				var lfont3=document.createElement("font");
				lfont3.setAttribute("size","2");
				lfont3.appendChild(link3);


				var link4=document.createElement("dt");
				var lc4=document.createElement("a");
				lc4.appendChild(document.createTextNode("FMC"));
				lc4.setAttribute("href","http://www.fmc.gov.in");
				var lfont4=document.createElement("font");
				lfont4.setAttribute("size","2");

				link4.appendChild(lc4);
				lfont4.appendChild(link4);

				linklist.appendChild(lfont1);
				linklist.appendChild(lfont4);
				linklist.appendChild(lfont3);
				linklist.appendChild(lfont2);
				

				ltcell2.appendChild(linklist);
				ltrow2.appendChild(ltcell2);
			
				ltcell2.setAttribute("align","center");
				ltbody.appendChild(ltrow2);
				linktable.appendChild(ltbody);
				linktable.setAttribute("background","image/bg4table1.jpg");

				if((screen.width==800) && (screen.height==600))
				{
					linktable.setAttribute("width","150");

				}

				else
				{
					linktable.setAttribute("width","180");
				}
				cell4left[3].appendChild(linktable);
				cell4left[3].setAttribute("width","100");
				cell4left[3].setAttribute("height","112");


			logotable=document.createElement("table");
				lgbody=document.createElement("tbody");
				lgrow1=document.createElement("tr");
				lgcell1=document.createElement("td");

				f1=document.createElement("font");
				var lbold=document.createElement("b");
				f1.appendChild(document.createTextNode("Our Clearing Bank"));

				f1.setAttribute("size","3");

				lbold.appendChild(f1);
				lgcell1.appendChild(lbold);



				lgcell1.setAttribute("bgColor","#87CEFA");

				if((screen.width==1024)&&(screen.height==768))
				{
					lgcell1.setAttribute("width","180");
				}
				else
				{
					lgcell1.setAttribute("width","130");
				}


				lgcell1.setAttribute("align","center");
				lgrow1.appendChild(lgcell1);
				lgbody.appendChild(lgrow1);

			lgrow2=document.createElement("tr");
				lgcell2=document.createElement("td");


			var logo=document.createElement("img");
			var logolink=document.createElement("a");
			logolink.appendChild(logo);
			logo.setAttribute("src","image/sbi_logo.gif");
			if(screen.width==1024 && screen.height==768)
			logo.setAttribute("width","170");
			else
			{
				logo.setAttribute("width","140");
			}
			logo.setAttribute("height","45");
			lgcell2.appendChild(logolink);
			logolink.setAttribute("href","https://www.onlinesbi.com/");
			logolink.setAttribute("target","_blank");

			lgrow2.appendChild(lgcell2);
			lgbody.appendChild(lgrow2);
			logotable.appendChild(lgbody);

			cell4left[4].appendChild(logotable);
			cell4left[4].setAttribute("width","100");
			for(var i=0;i<5;i++)
			{
				row4left[i].appendChild(cell4left[i]);

			}


			// adding rows to table body

			for(var i=0;i<5;i++)
			{
				tbodyleft.appendChild(row4left[i]);
			}


			//adding table body to the table

			tbleft.appendChild(tbodyleft);


			//adding table to the script defined "body"

			body.appendChild(tbleft);

			tbleft.setAttribute("border","1");
			tbleft.setAttribute("align","left");
			tbleft.setAttribute("bordercolor","");
			if(browserName=="firefox")
			{ 
				tbleft.setAttribute("width","175");
			}





//..........................................table for graph and right ticker ...................................



			var righttable=document.createElement("table");
			var rtbody=document.createElement("tbody");
			var rtcell=new Array(4);
			var rtrow=new Array(2);

			for(var i=0;i<4;i++)
			{
				rtcell[i]=document.createElement("td");
			}
			for(var i=0;i<2;i++)
			{
				rtrow[i]=document.createElement("tr");
			}



			var rightscroll=document.createElement("iframe");
			rtcell[1].appendChild(rightscroll);
			rightscroll.setAttribute("src","right07.htm");
			rightscroll.setAttribute("width","100%");
			rightscroll.setAttribute("height","280");
			rightscroll.setAttribute("scrolling","no");


			rtcell[1].setAttribute("align","right");
		//	rtcell[1].setAttribute("width","267");
			
			if(browserName=="msie")
			{
				
			rtcell[1].setAttribute("height","242");
			}
			else if(browserName=="opera")
			{
				rtcell[1].setAttribute("height","210");
			}
			else if(browserName=="firefox")
			{
				rtcell[1].setAttribute("height","230");
			}


			//........................................
			var graphh=document.createElement("iframe");
			rtcell[0].appendChild(graphh);
			graphh.setAttribute("id","onlinegraph");
			graphh.setAttribute("src","SMulti.jsp");
			graphh.setAttribute("width","500");
			graphh.setAttribute("height","285");
			graphh.setAttribute("scrolling","no");
			
			//rtcell[0].appendChild(document.createTextNode("GRAPH"));
			//rtcell[0].setAttribute("align","center");
			rtcell[0].setAttribute("title","Click here to view Series wise Graph");
			


			if((screen.width==800)&& (screen.height==600))
			{
				rtcell[0].setAttribute("width","50%");
			}
			else
			{
				rtcell[0].setAttribute("width","55%");
			}
		
			rtrow[0].appendChild(rtcell[0]);
			rtrow[0].appendChild(rtcell[1]);

			// for second row............................



			rtcell[2].setAttribute("width","100%");
			rtcell[2].setAttribute("colSpan","2");
			if((screen.width==800) && (screen.height==600))
			{
				rtcell[2].setAttribute("height","319");
			}
			else
			{
				rtcell[2].setAttribute("height","319");
			}

			//...........................


			var iframesrc="sauda3.jsp";
			var pressiframe=document.createElement("iframe");
			rtcell[2].appendChild(pressiframe);
			rtrow[1].appendChild(rtcell[2]);

			pressiframe.setAttribute("id","datamain");
			pressiframe.setAttribute("src",iframesrc);
			pressiframe.setAttribute("width","100%");
			pressiframe.setAttribute("height","100%");
			pressiframe.setAttribute("scrolling","no");
			pressiframe.setAttribute("frameborder","1");



			for(var i=0;i<2;i++)
			{
				rtbody.appendChild(rtrow[i]);
			}
			righttable.appendChild(rtbody);
			body.appendChild(righttable);
			righttable.setAttribute("border","1");
			if((screen.width==1024)&&(screen.height==768))
			{
				if(browserName=="msie")
				righttable.setAttribute("width","800");
				if(browserName=="opera")
				{
					righttable.setAttribute("width","800");
					righttable.setAttribute("height","620");
				}
				if(browserName=="firefox")
				{
					righttable.setAttribute("width","800");
					righttable.setAttribute("height","630");
				}		
				if(browserName=="safari")
				{
					righttable.setAttribute("width","800");
					righttable.setAttribute("height","610");
				}	
			}
			else
			{
				righttable.setAttribute("width","79%");
			}
			//righttable.setAttribute("height","25%");
			righttable.setAttribute("align","right");
			document.write("<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"
			+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"+"<br>"
			+"<br>"+"<br>"+"<br>");
			document.getElementById("loginbutton").onclick=function(){buttonfun();};








