preetg 0 Junior Poster in Training

m using javascript and css for creating horizontal menu for my project.... but i m facing prob regarding their direction..... i want sub menu should open in right direction but not below the main menu items. ........ help me out.

var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.
  var transOptions= "gradientSize=[0..1], wipestyle=0/1, motion=right";
function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    	var spanref=document.createElement("span")

if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)
.horizontalcssmenu ul{
margin: 0;
padding: 0;
list-style-type: none;

/*Top level list items*/
.horizontalcssmenu ul li{
position: relative;
display: inline;
float: left;


/*Top level menu link items style*/
.horizontalcssmenu ul li a{
display: block;
width: 120px; /*Width of top level menu link items*/
padding: 2px 8px;
border: 1px solid #202020;
border-left-width: 0;
text-decoration: none;
color: White;
font: bold 13px Tahoma;
/*Sub level menu*/
.horizontalcssmenu ul li ul{

left: o;
top: 0;
border-top: 1px solid #202020;
position: absolute;
display: block;
visibility: hidden;
z-index: 100;
float: right;

/*Sub level menu list items*/
.horizontalcssmenu ul li ul li{
display: inline block;
float: right;

/* Sub level menu links style */
.horizontalcssmenu ul li ul li a{
width: 160px; /*width of sub menu levels*/
font-weight: bold;
padding: 2px 5px;
background: #BCD2EE;
border-width: 0 1px 1px 1px;

.horizontalcssmenu ul li a:hover{
background: #4682B4; 

.horizontalcssmenu ul li ul li a:hover{
background: #4682B4;

.horizontalcssmenu .arrowdiv{
position: absolute;
right: 0;
background: transparent url(menuarrow.gif) no-repeat center left;

* html p#iepara{ /*For a paragraph (if any) that immediately follows menu, add 1em top spacing between the two in IE*/
padding-top: 1em;
/* Holly Hack for IE \*/
* html .horizontalcssmenu ul li { float: left; height: 1%; }
* html .horizontalcssmenu ul li a { height: 1%; }
<link rel="stylesheet" type="text/css" href="csshorizontalmenu.css" />

<script type="text/javascript" src="csshorizontalmenu.js">

<body bgcolor="E6E6FA">

<div class="horizontalcssmenu">
<ul id="cssmenu1">
<li><a href="#" >Masters</a>
<li><a href="a.html"> A </a> </li>
<li><a href="a.html"> b </a> </li>
<li><a href="a.html"> c </a> </li>
<li><a href="a.html"> d </a> </li>
</ul> </li>
<li><a href="#">Processing</a>
<li><a href="a.html"> X </a> </li>
<li><a href="a.html"> Y </a> </li>
<li><a href="a.html"> Z </a> </li>
<li><a href="a.html"> W </a> </li>

<li><a href="#">Reports</a>
    <li><a href="a.html">A</a></li>
    <li><a href="b.html">B</a></li>
    <li><a href="c.html">C</a></li>
<li><a href='#">Utilities</a>

    <li><a href="gk.html">GK</a></li>
    <li><a href="pk.html">PK</a></li>
    <li><a href="ah.html">AH</a></li>

<br style="clear: left;" />