// JavaScript Document



function FullSize()

{

	var cheight;

	var sheight;

	var headerdiv;

	var footerdiv;

	var contentdiv;

	var h_f;

	

	headerdiv = document.getElementById('Header').offsetHeight;

	footerdiv = document.getElementById('Footer').offsetHeight;

	contentdiv = document.getElementById('Content').offsetHeight;

	

	h_f= parseInt(headerdiv) + parseInt(footerdiv);

	

	cheight=document.documentElement.clientHeight;

	sheight=document.documentElement.scrollHeight;

	

	h_f= cheight - h_f;

	

	if(h_f >= contentdiv )

	{		

		document.getElementById('Content').style.height=h_f + 'px';

	}

	else

	{	

		document.getElementById('Content').style.height=contentdiv + 'px';

	}

}



/* top bar dropdownmenus */



var menurootpath = "/";



//carpet



var menu1=new Array()

menu1[0]='<ul id="u1"><li><a href="'+menurootpath+'carpet/style.php">style and design gallery</a></li>'

menu1[1]='<li><a href="'+menurootpath+'carpet/stainmaster/index.php">stainmaster</a></li>'

menu1[2]='<li><a href="'+menurootpath+'carpet/karastan/index.php">karastan</a></li>'

menu1[3]='<li><a href="'+menurootpath+'carpet/ralphlauren/ralphlauren.php">ralph lauren</a></li>'

menu1[4]='<li><a href="'+menurootpath+'carpet/wool/wool.php">wool - the natural choice</a></li>'

menu1[5]='<li><a href="'+menurootpath+'carpet/selectacarpet/selectacarpet.php">selecting a carpet - fibers &amp; textures</a></li>'

menu1[6]='<li><a href="'+menurootpath+'carpet/cushion/cushion.php">carpet cushion</a></li>'

menu1[7]='<li><a href="'+menurootpath+'carpet/ecofriendly.php">environmentally friendly</a></li>'

menu1[8]='<li><a href="'+menurootpath+'carpet/binding.php">binding and serging</a></li>'

menu1[9]='<li><a href="'+menurootpath+'carpet/remnants/remnants.php">carpet remnant outlet</a></li>'

menu1[10]='<li><a href="'+menurootpath+'floorcare/cleancarpet.php">maintenance and floor care</a></li></ul>'





//Hardwood



var menu2=new Array()

menu2[0]='<ul id="u2"><li><a href="'+menurootpath+'hardwood/style.php">style and design gallery</a></li>'

//menu2[1]='<li><a href="'+menurootpath+'hardwood/junckers/junckers.php">junckers</a></li>'

menu2[3]='<li><a href="'+menurootpath+'hardwood/mannington/mannington.php">mannington</a></li>'

menu2[4]='<li><a href="'+menurootpath+'hardwood/lauzon/lauzon.php">lauzon</a></li>'

menu2[5]='<li><a href="'+menurootpath+'hardwood/ecotimber/index.php">ecotimber</a></li>'

menu2[6]='<li><a href="'+menurootpath+'hardwood/armstrong/armstrong.php">armstrong</a></li>'

menu2[7]='<li><a href="'+menurootpath+'hardwood/naturalcork/naturalcork.php">natural cork flooring</a></li>'

menu2[8]='<li><a href="'+menurootpath+'hardwood/bamboo/bamboo.php">bamboo</a></li>'

menu2[9]='<li><a href="'+menurootpath+'hardwood/benefits.php">benefits of wood</a></li>'

menu2[10]='<li><a href="'+menurootpath+'hardwood/accents/accents.php">accents and features</a></li>'

menu2[11]='<li><a href="'+menurootpath+'floorcare/hardwood.php">maintenance and floor care</a></li></ul>'





//laminate



var menu3=new Array()

menu3[0]='<ul id="u3"><li><a href="'+menurootpath+'laminate/style.php">style and design gallery</a></li>'

menu3[1]='<li><a href="'+menurootpath+'laminate/decorating/decorating.php">decorating with laminate</a></li>'

menu3[2]='<li><a href="'+menurootpath+'laminate/benefits.php">benefits of laminate</a></li>'

menu3[3]='<li><a href="'+menurootpath+'laminate/mannington/mannington.php">mannington</a></li>'

menu3[4]='<li><a href="'+menurootpath+'laminate/quickstep/quickstep.php">quick step</a></li>'

menu3[5]='<li><a href="'+menurootpath+'laminate/wilsonart/wilsonart.php">wilsonart</a></li>'

menu3[6]='<li><a href="'+menurootpath+'floorcare/hardwood.php">maintenance and floor care</a></li></ul>'



//tiles and stone



var menu4=new Array()

menu4[0]='<ul id="u4"><li><a href="'+menurootpath+'tileandstone/style.php">style and design gallery</a></li>'

menu4[1]='<li><a href="'+menurootpath+'tileandstone/decorating-with-tile/">decorating with tile</a></li>'

menu4[2]='<li><a href="'+menurootpath+'tileandstone/porcelain-tile/">porcelain tile</a></li>'

menu4[3]='<li><a href="'+menurootpath+'tileandstone/tilebenefits.php">benefits of tile</a></li>'

menu4[4]='<li><a href="'+menurootpath+'tileandstone/decorating-with-natural-stone/">decorating with natural stone</a></li>'

menu4[5]='<li><a href="'+menurootpath+'tileandstone/stonebenefits.php">benefits of stone</a></li>'

menu4[6]='<li><a href="'+menurootpath+'tileandstone/accents/accents.php">accents and features</a></li>'

menu4[7]='<li><a href="'+menurootpath+'floorcare/ceramictile.php">maintenance and floor care</a></li></ul>'





//vinyl



var menu5=new Array()

menu5[0]='<ul id="u5"><li><a href="'+menurootpath+'vinyl/style.php">style and design gallery</a></li>'

menu5[1]='<li><a href="'+menurootpath+'vinyl/stainmaster/index.php">stainmaster</a></li>'

menu5[2]='<li><a href="'+menurootpath+'vinyl/mannington/index.php">mannington</a></li>'

//menu5[3]='<li><a href="'+menurootpath+'vinyl/konecto/index.php">konecto</a></li>'

menu5[3]='<li><a href="'+menurootpath+'vinyl/amtico/index.php">amtico</a></li>'

menu5[4]='<li><a href="'+menurootpath+'vinyl/benefits.php">benefits of vinyl</a></li>'

menu5[5]='<li><a href="'+menurootpath+'floorcare/vinyl.php">maintenance and floor care</a></li></ul>'





//Area rugs



var menu6=new Array()

menu6[0]='<ul id="u6"><li><a href="'+menurootpath+'arearugs/search/index.php">search area rugs</a></li>'

menu6[1]='<li><a href="'+menurootpath+'arearugs/decorating/decorating.php">decorating with area rugs</a></li>'

menu6[2]='<li><a href="'+menurootpath+'arearugs/orientalguide/orientalguide.php">rug buyers guide</a></li>'

menu6[3]='<li><a href="'+menurootpath+'arearugs/orientalgallery.php">oriental rug gallery</a></li>'

menu6[4]='<li><a href="'+menurootpath+'arearugs/tibetan/tibetan.php">tibetan rugs</a></li>'

menu6[5]='<li><a href="'+menurootpath+'arearugs/karastan/karastan.php">karastan rugs</a></li>'

menu6[6]='<li><a href="'+menurootpath+'arearugs/runners.php">using runners in your home</a></li>'

menu6[7]='<li><a href="'+menurootpath+'arearugs/orientalguide/loomed.php">power loomed rugs</a></li>'

menu6[8]='<li><a href="'+menurootpath+'arearugs/colescustom.php">coles custom area rugs</a></li>'

menu6[9]='<li><a href="'+menurootpath+'arearugs/nonslip/nonslip.php">area rug non-slip padding</a></li></ul>'





//window treatments



var menu7=new Array()

menu7[0]='<ul id="u7"><li><a href="'+menurootpath+'window/draperies.php">custom draperies</a></li>'

menu7[1]='<li><a href="'+menurootpath+'window/blinds.php">custom blinds</a></li>'

menu7[2]='<li><a href="'+menurootpath+'window/shades.php">custom shades</a></li>'

menu7[3]='<li><a href="'+menurootpath+'window/shutters.php">custom shutters</a></li>'

menu7[4]='<li><a href="'+menurootpath+'window/upholstery.php">custom upholstery</a></li>'

menu7[5]='<li><a href="'+menurootpath+'window/bedspreads.php">custom bedspreads</a></li></ul>'





//floor care



/*var menu8=new Array()

menu8[0]='<ul id="u8"><li><a href="'+menurootpath+'floorcare/protectcarpet.php">protect your carpet</a></li>'

menu8[1]='<li><a href="'+menurootpath+'floorcare/cleancarpet.php">cleaning your carpet</a></li>'

menu8[2]='<li><a href="'+menurootpath+'floorcare/woolcarpet.php">wool carpet stain removal</a></li>'

menu8[3]='<li><a href="'+menurootpath+'floorcare/nyloncarpet.php">nylon carpet stain removal</a></li>'

menu8[4]='<li><a href="'+menurootpath+'floorcare/olefincarpet.php">olefin carpet stain removal</a></li>'

menu8[5]='<li><a href="'+menurootpath+'floorcare/nonfoodstains.php">cleaning other stains(non food)</a></li>'

menu8[6]='<li><a href="'+menurootpath+'floorcare/hardwood.php">hardwood &amp; laminate floor care</a></li>'

menu8[7]='<li><a href="'+menurootpath+'floorcare/ceramictile.php">ceramic tile care</a></li>'

menu8[8]='<li><a href="'+menurootpath+'floorcare/naturalstone.php">natural stone care guide</a></li>'

menu8[9]='<li><a href="'+menurootpath+'floorcare/vinyl.php">vinyl floor care</a></li>'

menu8[10]='<li><a href="'+menurootpath+'floorcare/coir.php">coir & sisal maintenance</a></li></ul>'*/

	

		

		

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)

var hidemenu_onclick="yes" //hide menu when user clicks within menu?



/////No further editting needed

var cmenu



var ie4=document.all

var ns6=document.getElementById&&!document.all



if (ie4||ns6)

document.write('<div id="dropmenudiv" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')



function getposOffset(what, offsettype){

var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;

var parentEl=what.offsetParent;

while (parentEl!=null){

totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;

parentEl=parentEl.offsetParent;

}

return totaloffset;

}





function showhide(obj, e, visible, hidden, menuwidth){



if (ie4||ns6)

dropmenuobj.style.left=dropmenuobj.style.top="-500px"

if (menuwidth!=""){

dropmenuobj.widthobj=dropmenuobj.style

dropmenuobj.widthobj.width=menuwidth

}

if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")

obj.visibility=visible

else if (e.type=="click")

obj.visibility=hidden

}



function iecompattest(){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}



function clearbrowseredge(obj, whichedge){

var edgeoffset=0

if (whichedge=="rightedge"){

var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15

dropmenuobj.contentmeasure=dropmenuobj.offsetWidth

if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth

}

else{

var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset

var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18

dropmenuobj.contentmeasure=dropmenuobj.offsetHeight

if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?

edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight

if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?

edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge

}

}

return edgeoffset

}



function populatemenu(what){

if (ie4||ns6)

dropmenuobj.innerHTML=what.join("")

}





function dropdownmenu(obj, e, menucontents, menuwidth){

	

cmenu = menucontents[0].substr(8,2);



if (obj.id == 'm1')  {

obj=document.getElementById? document.getElementById("m1") : m1

obj.style.color="#c3080f";

} else if (obj.id == 'm2')  {

obj=document.getElementById? document.getElementById("m2") : m2

obj.style.color="#c3080f";

} else if (obj.id == 'm3')  {

obj=document.getElementById? document.getElementById("m3") : m3

obj.style.color="#c3080f";

} else if (obj.id == 'm4')  {

obj=document.getElementById? document.getElementById("m4") : m4

obj.style.color="#c3080f";

} else if (obj.id == 'm5')  {

obj=document.getElementById? document.getElementById("m5") : m5

obj.style.color="#c3080f";

} else if (obj.id == 'm6')  {

obj=document.getElementById? document.getElementById("m6") : m6

obj.style.color="#c3080f";

} else if (obj.id == 'm7')  {

obj=document.getElementById? document.getElementById("m7") : m7

obj.style.color="#c3080f";

} /*else if (obj.id == 'm8')  {

obj=document.getElementById? document.getElementById("m8") : m8

obj.style.color="#c3080f";

}*/



if (window.event) event.cancelBubble=true

else if (e.stopPropagation) e.stopPropagation()

clearhidemenu()

dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv

populatemenu(menucontents)



if (ie4||ns6){

showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)



dropmenuobj.x=getposOffset(obj, "left")

dropmenuobj.y=getposOffset(obj, "top")

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"

dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

}



return clickreturnvalue()

}



function clickreturnvalue(){

if (ie4||ns6) return false

else return true

}



function contains_ns6(a, b) {

while (b.parentNode)

if ((b = b.parentNode) == a)

return true;

return false;

}



function dynamichide(e){

if (ie4&&!dropmenuobj.contains(e.toElement))

delayhidemenu()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

delayhidemenu()

}



function hidemenu(e){

if (typeof dropmenuobj!="undefined"){

if (ie4||ns6)

dropmenuobj.style.visibility="hidden"

}

}



function delayhidemenu(){

	

if (ie4||ns6)

delayhide=setTimeout("hidemenu()",disappeardelay)



obj1=document.getElementById? document.getElementById("m1") : m1

obj1.style.color="#ffffff";

obj2=document.getElementById? document.getElementById("m2") : m2

obj2.style.color="#ffffff";

obj3=document.getElementById? document.getElementById("m3") : m3

obj3.style.color="#ffffff";

obj4=document.getElementById? document.getElementById("m4") : m4

obj4.style.color="#ffffff";

obj5=document.getElementById? document.getElementById("m5") : m5

obj5.style.color="#ffffff";

obj6=document.getElementById? document.getElementById("m6") : m6

obj6.style.color="#ffffff";

obj7=document.getElementById? document.getElementById("m7") : m7

obj7.style.color="#ffffff";

//obj8=document.getElementById? document.getElementById("m8") : m8

//obj8.style.color="#ffffff";



}



function clearhidemenu(){	

if (typeof delayhide!="undefined")

clearTimeout(delayhide)



if (cmenu == 'u1')  {

	obj1=document.getElementById? document.getElementById("m1") : m1

	obj1.style.color="#c3080f";

} else if (cmenu == 'u2')  {

	obj2=document.getElementById? document.getElementById("m2") : m2

	obj2.style.color="#c3080f";

} else if (cmenu == 'u3')  {

	obj3=document.getElementById? document.getElementById("m3") : m3

	obj3.style.color="#c3080f";

} else if (cmenu == 'u4')  {

	obj4=document.getElementById? document.getElementById("m4") : m4

	obj4.style.color="#c3080f";

} else if (cmenu == 'u5')  {

	obj5=document.getElementById? document.getElementById("m5") : m5

	obj5.style.color="#c3080f";

} else if (cmenu == 'u6')  {

	obj6=document.getElementById? document.getElementById("m6") : m6

	obj6.style.color="#c3080f";

} else if (cmenu == 'u7')  {

	obj7=document.getElementById? document.getElementById("m7") : m7

	obj7.style.color="#c3080f";

} /*else if (cmenu == 'u8')  {

	obj8=document.getElementById? document.getElementById("m8") : m8

	obj8.style.color="#c3080f";

}*/



}



if (hidemenu_onclick=="yes")

document.onclick=hidemenu







/* left flyout menu */



/************************************************************************************************************

	(C) www.dhtmlgoodies.com, November 2005

	

	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	

	

	Terms of use:

	You are free to use this script as long as the copyright message is kept intact. However, you may not

	redistribute, sell or repost it without our permission.

	

	Thank you!

	

	www.dhtmlgoodies.com

	Alf Magne Kalleland

	

	************************************************************************************************************/



	var timeBeforeAutoHide = 700;	// Microseconds to wait before auto hiding menu(1000 = 1 second)

	var slideSpeed_out = 10;	// Steps to move sub menu at a time ( higher = faster)

	var slideSpeed_in = 10;

		

	

	var slideTimeout_out = 25;	// Microseconds between slide steps ( lower = faster)

	var slideTimeout_in = 10;	// Microseconds between slide steps ( lower = faster)

	

	var showSubOnMouseOver = true;	// false = show sub menu on click, true = show sub menu on mouse over

	var fixedSubMenuWidth = false;	// Width of sub menu items - A number(width in pixels) or false when width should be dynamic

	

	var xOffsetSubMenu = 3; 	// Offset x-position of sub menu items - use negative value if you want the sub menu to overlap main menu

	

	var slideDirection = 'right';	// Slide to left or right ?

	

	/* Don't change anything below here */

	

	var activeSubMenuId = false;

	var activeMainMenuItem = false;

	var currentZIndex = 1000;		

	var autoHideTimer = 0;

	var submenuObjArray = new Array();

	var okToSlideInSub = new Array();

	var subPositioned = new Array();

	



	function stopAutoHide()

	{

		autoHideTimer = -1;

	}

	

	function initAutoHide()

	{

		autoHideTimer = 0;

		if(autoHideTimer>=0)autoHide();

	}

	

	function autoHide()

	{

		

		if(autoHideTimer>timeBeforeAutoHide)

		{

			

			if(activeMainMenuItem){

				activeMainMenuItem.className='';

				activeMainMenuItem = false;

			}

			

			if(activeSubMenuId){

				var obj = document.getElementById('subMenuDiv' + activeSubMenuId);

				showSub();

			}

		}else{

			if(autoHideTimer>=0){

				autoHideTimer+=50;

				setTimeout('autoHide()',50);

			}

		}

	}	

	

	function getTopPos(inputObj)

	{		

	  var returnValue = inputObj.offsetTop;

	  while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetTop;

	  return returnValue;

	}

	

	function getLeftPos(inputObj)

	{

	  var returnValue = inputObj.offsetLeft;

	  while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft;

	  return returnValue;

	}

	

	function showSub()

	{

		var subObj = false;

		if(this && this.tagName){

			var numericId = this.parentNode.id.replace(/[^0-9]/g,'');

			okToSlideInSub[numericId] = false;

			var subObj = document.getElementById('subMenuDiv' + numericId);

			if(activeMainMenuItem)activeMainMenuItem.className='';

			if(subObj){

				if(!subPositioned[numericId]){

					if(slideDirection=='right'){

						subObj.style.left = getLeftPos(submenuObjArray[numericId]['parentDiv']) + submenuObjArray[numericId]['parentDiv'].offsetWidth + xOffsetSubMenu + 'px';

					}else{

						subObj.style.left = getLeftPos(submenuObjArray[numericId]['parentDiv']) + xOffsetSubMenu + 'px';

						

					}

					submenuObjArray[numericId]['left'] = subObj.style.left.replace(/[^0-9]/g,'');

					subObj.style.top = getTopPos(submenuObjArray[numericId]['parentDiv']) + 'px';

					subPositioned[numericId] = true;

				}				

				subObj.style.visibility = 'visible';

				subObj.style.zIndex = currentZIndex;

				currentZIndex++;	

				this.className='activeMainMenuItem';

				activeMainMenuItem = this;

			}

		}else{

			var numericId = activeSubMenuId;

		}

		if(activeSubMenuId && (numericId!=activeSubMenuId || !subObj))slideMenu(activeSubMenuId,(slideSpeed_in*-1));

		if(numericId!=activeSubMenuId && this && subObj){

			subObj.style.width = '0px';	

			slideMenu(numericId,slideSpeed_out);

			activeSubMenuId = numericId;

		}else{

			if(numericId!=activeSubMenuId)activeSubMenuId = false;

		}

		if(showSubOnMouseOver)stopAutoHide();

	}

	

	function slideMenu(menuIndex,speed){

		var obj = submenuObjArray[menuIndex]['divObj'];

		var obj2 = submenuObjArray[menuIndex]['ulObj'];

		var width = obj.offsetWidth + speed;

		if(speed<0){

			if(width<0)width = 0;

			obj.style.width = width + 'px';

			if(slideDirection=='left'){

				obj.style.left = submenuObjArray[menuIndex]['left'] - width + 'px';

				obj2.style.left = '0px';

			}else{

				obj2.style.left = width - submenuObjArray[menuIndex]['width'] + 'px' 

			}

			if(width>0 && okToSlideInSub[menuIndex])setTimeout('slideMenu(' + menuIndex + ',' + speed + ')',slideTimeout_in); else{

				obj.style.visibility = 'hidden';

				obj.style.width = '0px';

				if(activeSubMenuId==menuIndex)activeSubMenuId=false;

			}

			

		}else{

			if(width>submenuObjArray[menuIndex]['width'])width = submenuObjArray[menuIndex]['width'];

			if(slideDirection=='left'){

				obj.style.left = submenuObjArray[menuIndex]['left'] - width + 'px';

				obj2.style.left = '0px';

			}else{

				obj2.style.left = width - submenuObjArray[menuIndex]['width'] + 'px' 

			}		

			

			obj.style.width = width + 'px';

			if(width<submenuObjArray[menuIndex]['width']){

				setTimeout('slideMenu(' + menuIndex + ',' + speed + ')',slideTimeout_out);

			}else{

				okToSlideInSub[menuIndex] = true;

			}

		}

	}

	function resetPosition()

	{

		subPositioned.length = 0;

	}

			

	function initLeftMenu()

	{

		if(document.getElementById('dhtmlgoodies_menu')) {
		var menuObj = document.getElementById('dhtmlgoodies_menu');	

		var mainMenuItemArray = new Array();

		
		if(menuObj.getElementsByTagName('LI')[0]) {
		
			var mainMenuItem = menuObj.getElementsByTagName('LI')[0];		
	
			while(mainMenuItem){
	
				if(mainMenuItem.tagName && mainMenuItem.tagName.toLowerCase()=='li'){
	
					mainMenuItemArray[mainMenuItemArray.length] = mainMenuItem;
	
					var aTag = mainMenuItem.getElementsByTagName('A')[0];
	
					if(showSubOnMouseOver)
	
						aTag.onmouseover = showSub;	
	
					else
	
						aTag.onclick = showSub;	
	
				}
	
				mainMenuItem = mainMenuItem.nextSibling;
			}

		}
		

		

		var lis = menuObj.getElementsByTagName('A');

		for(var no=0;no<lis.length;no++){

			if(!showSubOnMouseOver)lis[no].onmouseover = stopAutoHide;

			lis[no].onmouseout = initAutoHide;

			lis[no].onmousemove = stopAutoHide;

		}

				

		for(var no=0;no<mainMenuItemArray.length;no++){

			var sub = mainMenuItemArray[no].getElementsByTagName('UL')[0];

			if(sub){

				mainMenuItemArray[no].id = 'mainMenuItem' + (no+1);

				var div = document.createElement('DIV');

				div.className='dhtmlgoodies_subMenu';

				document.body.appendChild(div);

				div.appendChild(sub);

				if(slideDirection=='right'){

					div.style.left = getLeftPos(mainMenuItemArray[no]) + mainMenuItemArray[no].offsetWidth + xOffsetSubMenu + 'px';

				}else{

					div.style.left = getLeftPos(mainMenuItemArray[no]) + xOffsetSubMenu + 'px';

				}

				div.style.top = getTopPos(mainMenuItemArray[no]) + 'px';

				div.id = 'subMenuDiv' + (no+1);

				sub.id = 'submenuUl' + (no+1);

				sub.style.position = 'relative';	



				if(navigator.userAgent.indexOf('Opera')>=0){

					submenuObjArray[no+1] = new Array();

					submenuObjArray[no+1]['parentDiv'] = mainMenuItemArray[no];

					submenuObjArray[no+1]['divObj'] = div;

					submenuObjArray[no+1]['ulObj'] = sub;

					submenuObjArray[no+1]['width'] = sub.offsetWidth;

					submenuObjArray[no+1]['left'] = div.style.left.replace(/[^0-9]/g,'');

				}

				sub.style.left = 1 - sub.offsetWidth + 'px';	

				

				if(document.all)div.style.width = '1px';	

					

				if(navigator.userAgent.indexOf('Opera')<0){

					submenuObjArray[no+1] = new Array();

					submenuObjArray[no+1]['parentDiv'] = mainMenuItemArray[no];

					submenuObjArray[no+1]['divObj'] = div;

					submenuObjArray[no+1]['ulObj'] = sub;

					submenuObjArray[no+1]['width'] = sub.offsetWidth;

					

					

					

					submenuObjArray[no+1]['left'] = div.style.left.replace(/[^0-9]/g,'');

					if(fixedSubMenuWidth)submenuObjArray[no+1]['width'] = fixedSubMenuWidth;

				}	



				if(!document.all)div.style.width = '1px';			

					

			}			

		}

			



		

		

		menuObj.style.visibility = 'visible';

		}

		window.onresize = resetPosition;

	}

	

	

	window.onload = initLeftMenu;