// JavaScript Document

function mailman(url,user)
{
	var at = '@';
	var mto = user+at+url+'.com.au';
	document.write('<a href="mailto:'+mto+'">'+mto+'</a>');
}
/*
function buildMenu()
{
	if(document.getElementById('navContainer'))
	{
		var menuList = new Array();
		menuList[0] = ["Home","index.htm"];
		menuList[1] = ["Our Products","shuttersrusproducts.htm"];
		menuList[2] = ["Wholesale Information","shutterwholesale.htm"];
		menuList[3] = ["Policies","policies.htm"];
		menuList[4] = ["Contact Us","contact.htm"];
		menuList[5] = ["Quick Quote","quote.htm"];
		menuList[6] = ["Sitemap","sitemap.htm"];
	
		var unorderedList = document.createElement('ul');
	
		document.getElementById('navContainer').appendChild(unorderedList);//Search for Menu id and and append UL tag
		for (i=0; i<menuList.length; i++)
		{
			var liTag = unorderedList.appendChild(document.createElement('li'));
			var aHref = liTag.appendChild(document.createElement('a'));
			var liContent = document.createTextNode(menuList[i][0]);
	
			unorderedList.appendChild(liTag);			//Append LI after UL
			liTag.appendChild(aHref);					//Append A tag after LI
			aHref.setAttribute('href',menuList[i][1]);	//Set href attribute of A tag to URL
			aHref.appendChild(liContent);				//Append Menu text after A tag
		}
	}
}
*/
function randImage()
{
	if(document.getElementById('showCaseImage'))
	{
		var imageDir = 'images';									// Directory name
		var imageList = new Array('001ALUA-002b.jpg','004ALUW-000b.jpg','010ALUW-000b.jpg','timberblades_01.jpg','000ALUW012.jpg','000ALUW014.jpg','011ALUW-000.jpg','007ALUW-001.jpg');// List of images.
		var showImageDIV = document.getElementById('showCaseImage');// Search for id tag to append image to.
		var showImage = new Image();
		var randNum = Math.floor(Math.random()*imageList.length);	// Random number generator.
		
		showImage.src = imageDir+'/'+imageList[randNum];	// Assign "src" to image.
		showImageDIV.appendChild(showImage);				// Append image to "TD" tag.		
	}
	
}


function buildNaviBar()
{
//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 0

//Menu properties   
oCMenu.pxBetween=1
oCMenu.fromLeft=10 
oCMenu.fromTop=72
oCMenu.rows=1 
oCMenu.menuPlacement="center"
                                                             
//oCMenu.offlineRoot="file:///C:/Cam/WEBFILES/shutters/" 
//oCMenu.offlineRoot="file:///G:/WebFiles/shutters/" 
oCMenu.offlineRoot="file:///C:/Documents and Settings/eisabai/Desktop/website/shutters/caloundra/"
//oCMenu.offlineRoot="file:///d:/Cam/Websites/postnrail.com.au/shutters/"
oCMenu.onlineRoot="http://www.shuttersrus.com.au/"
//oCMenu.onlineRoot="/" 
oCMenu.resizeCheck=1 
oCMenu.wait=500 
oCMenu.fillImg="coolmenus/cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="100%"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=0 
oCMenu.barY=0
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=100
oCMenu.level[0].height=20 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"

//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
//oCMenu.level[1].width=oCMenu.level[0].width-2
oCMenu.level[1].width=100
oCMenu.level[1].height=20
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=100
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oCMenu.makeMenu('top0','','&nbsp;Home','http://melbourne.shuttersrus.com.au/index.htm','')
	oCMenu.makeMenu('sub00','top0','About Us','http://melbourne.shuttersrus.com.au/about.htm')
	oCMenu.makeMenu('sub01','top0','Contact Us','http://melbourne.shuttersrus.com.au/contactus.htm')
	oCMenu.makeMenu('sub02','top0','Links','home/links.htm','main')
	oCMenu.makeMenu('sub03','top0','Resources','resources.htm','main')
	oCMenu.makeMenu('sub04','top0','Glossary','home/definitions.htm','main')
	
oCMenu.makeMenu('top1','','&nbsp;Product Details','shuttersrusproducts.htm','main')
	oCMenu.makeMenu('sub10','top1','Petite (E45 Blade)','products/shutterbladepetite.htm','main')
	oCMenu.makeMenu('sub11','top1','Mondo (E70 Blade)','products/shutterblademondo.htm','main')
	oCMenu.makeMenu('sub12','top1','Classic (E90 Blade)','products/shutterbladeclassic.htm','main')
	oCMenu.makeMenu('sub13','top1','Euro (E115 Blade)','products/shutterbladeeuro.htm','main')
	oCMenu.makeMenu('sub14','top1','E150 Blade','products/shutterbladee150.htm','main')
	oCMenu.makeMenu('sub15','top1','Accent 5003','products/louvreaccent5003.htm','main')
	oCMenu.makeMenu('sub16','top1','Accent 6025','products/louvreaccent6025.htm','main')
	oCMenu.makeMenu('sub17','top1','Cupola','products/louvrecupola.htm','main')
	oCMenu.makeMenu('sub18','top1','Louver Mover','products/louvermover.htm','main')
	oCMenu.makeMenu('sub19','top1','Paints and Finishes','products/paintnfinishes.htm','main')
	
oCMenu.makeMenu('top2','','Our Policies','policies/index.htm','main')
	oCMenu.makeMenu('sub21','top2','Terms & Conditions','policies/termsconditions.htm','main')
	oCMenu.makeMenu('sub22','top2','Warranties','policies/warranty.htm','main')
	oCMenu.makeMenu('sub23','top2','Site Terms of Use','policies/site-terms-use.htm','main')
	oCMenu.makeMenu('sub24','top2','Shipping & Handling','policies/shipping-handling.htm','main')

oCMenu.makeMenu('top3','','Our Gallery','http://melbourne.shuttersrus.com.au/gallery/index.htm')

oCMenu.makeMenu('top4','','Wholesale','wholesale/index.htm','main')
	oCMenu.makeMenu('sub40','top4','Opportunities','wholesale/opportunity.htm','main')
	oCMenu.makeMenu('sub41','top4','Requirements','wholesale/requirements.htm','main')
	oCMenu.makeMenu('sub42','top4','Programs','wholesale/program.htm','main')
	oCMenu.makeMenu('sub43','top4','Structure','wholesale/structure.htm','main')
	oCMenu.makeMenu('sub44','top4','Partner Alliance ','wholesale/partner.htm','main')
	oCMenu.makeMenu('sub45','top4','Manufacturer','wholesale/manufacturer.htm','main')
	oCMenu.makeMenu('sub46','top4','Reseller','wholesale/reseller.htm','main')

oCMenu.makeMenu('top5','','Quote','quote/','_blank')

//oCMenu.makeMenu('top5','','Quick Quote','quote/index.htm')
//	oCMenu.makeMenu('sub50','top5','Aluminium Shutters','#')
//	oCMenu.makeMenu('sub51','top5','Polywood Shutters','#')
//	oCMenu.makeMenu('sub52','top5','Timber Shutters','#')
//	oCMenu.makeMenu('sub53','top5','Combo ','#')
//	oCMenu.makeMenu('sub54','top5','Fixed Louvres','#')
//	oCMenu.makeMenu('sub55','top5','Glass Louvres','#')

//oCMenu.makeMenu('top6','','Sitemap','sitemap/index.htm')

//Leave this line - it constructs the menu
oCMenu.construct()		

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}