//Menu properties
//more details on properties: http://www.dhtmlcentral.com/projects/coolmenus/properties.asp?m=47
var oM=new makeCM("oM")
oM.pxBetween=2 //(px, "%")
oM.fromTop=135 //(px, "%")
oM.fromLeft=12 //(px, "%")
oM.menuPlacement=0 //"center","bottom","right","bottomcenter", 0=uses values above, new Array(px,"%")=individual placement)
oM.centerOffSet=0 //use with menuPlacement="center" (px)
oM.wait=500 //time drop is visible when mouse is not over (value=milliseconds 1000=1 sec)
oM.fillImg="_common/scripts/cm_fill.gif" //name of transparent gif - needed for NS + OP
oM.zIndex=100 
oM.resizeCheck=1 //reloads page when resized in NS + OP (0=no, 1=yes)

oM.onlineRoot="/" // from the root directory ("/common/scripts/")
oM.offlineRoot="file:///Q|/centuryquiz.mandogroup.com/docs/" //("file:///C|/Inetpub/wwwroot/")

oM.rows=0 //(1=rows, 0=colums)


//Background bar properties
//more details on properties: http://www.dhtmlcentral.com/projects/coolmenus/properties.asp?m=49
oM.useBar=0 //(1=yes, 0=no)
oM.barWidth="100%" //"menu"=same as menu (px, "%", "menu")
oM.barHeight="menu" //(px, "%", "menu")
oM.barX=0 //(px, "%", "menu")
oM.barY="menu" //(px, "%", "menu")
oM.barClass="clBar" //name of CSS
oM.barBorderX=0 //(px)
oM.barBorderY=2 //(px)
oM.barBorderClass="clB3" //name of CSS


//Level properties
//Syntax for fast creation (advanced users only)
//oM.level[1]=new cm_makeLevel(width,height,regClass,overClass,borderX,borderY,borderClass,rows,align,offsetX,offsetY,arrow,arrowWidth,arrowHeight)

//menu properties
//more details on properties: http://www.dhtmlcentral.com/projects/coolmenus/properties.asp?m=48
oM.level[0]=new cm_makeLevel()
oM.level[0].width=150 //(px, "%")
oM.level[0].height=18 //(px, "%")
oM.level[0].regClass="regMenu" //normal class
oM.level[0].overClass="overMenu"  //hover class
oM.level[0].borderX=0 //(px, 0=none)
oM.level[0].borderY=0 //(px, 0=none)
oM.level[0].borderClass="" 
oM.level[0].rows=0 //(0=beneth, 1=beside)
oM.level[0].align="bottom" //alignment of drops ("bottom","top","left","right","righttop","lefttop","bottomleft","topleft")
oM.level[0].offsetX=90 //x placement of drop (px)
oM.level[0].offsetY=-19 //y placement of drop (px)
oM.level[0].arrow=0 //use image to show more drops ("path from root of image", 0=none)
oM.level[0].arrowWidth=0 //(px)
oM.level[0].arrowHeight=0 //(px)

//drop 1 properties
oM.level[1]=new cm_makeLevel()
oM.level[1].width=150
oM.level[1].height=25
oM.level[1].regClass="regDrop" 
oM.level[1].overClass="overDrop" 
oM.level[1].borderX=1
oM.level[1].borderY=1
oM.level[1].borderClass="borderDrop"
//oM.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.3)"

/******************************************
Menu item creation:
more details on properties: http://www.dhtmlcentral.com/projects/coolmenus/properties.asp?m=50
***Set properties for items that are different from properties set above***
set nolink=1 if drop is a description and not a link.

myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
//oM.makeMenu('top0','','Login','#')
var bikky = document.cookie;

function getCookie(name) { // use: getCookie("name");
var index = bikky.indexOf(name + "=");
if (index == -1) return null;
index = bikky.indexOf("=", index) + 1;
var endstr = bikky.indexOf(";", index);
if (endstr == -1) endstr = bikky.length;
return unescape(bikky.substring(index, endstr));
}

if (getCookie('centuryquizmainlogin') != null && getCookie('centuryquizmainlogin').length > 0) {
	oM.makeMenu('top12','','Logout','login/svrLogout.asp')
}else{
	oM.makeMenu('top1','','Homepage','index.asp')
	
	oM.makeMenu('top2','','About Pubquiz.biz','company_profile.html')
		oM.makeMenu('2sub1','top2','Company Profile','company_profile.html')
		oM.makeMenu('2sub2','top2','Contact','contact.html')
	
	oM.makeMenu('top3','','Why Subscribe','why_subscribe_brief.html')
		oM.makeMenu('3sub1','top3','Briefly....','why_subscribe_brief.html')
		oM.makeMenu('3sub2','top3','Subscribing Options','why_subscribe_subscribing.html')
		oM.makeMenu('3sub3','top3','Full Details','why_subscribe_full.html')
	
	oM.makeMenu('top4','','Services','services.html')
		oM.makeMenu('4sub1','top4','Breweries & Pubs','breweries_pubs.html')
		oM.makeMenu('4sub2','top4','Media','media.html')
		oM.makeMenu('4sub3','top4','Brands','brands.html')
		oM.makeMenu('4sub4','top4','Promotional & Marketing','promotional_marketing.html')
		oM.makeMenu('4sub5','top4','Supplier Services','supplier_services.html')
	
	oM.makeMenu('top5','','Find a Pubquiznight','find_a_pub_quiz.html')
	
	oM.makeMenu('top6','','Quiz Masters','looking_for_qms.html')
		oM.makeMenu('6sub1','top6','Pubs looking for QMs','looking_for_qms.html')
		oM.makeMenu('6sub2','top6','QMs looking for pubs','looking_for_pubs.html')
		oM.makeMenu('6sub3','top6','Question Setters','question_setters.html')
	
	oM.makeMenu('top7','','Specials','specials.html')
	
	oM.makeMenu('top8','',"Links",'links.html')
	
	oM.makeMenu('top9','','FAQS','faq.html')
	    oM.makeMenu('9sub1','top9','FAQS','faq.html')
		oM.makeMenu('9sub2','top9','Running a Pub Quiz','running_a_pub_quiz.html')
		oM.makeMenu('9sub3','top9','Best Practise Ideas','best_practise_ideas.html')
	
	oM.makeMenu('top10','','FREE Quiz Kit','free_quiz_kit.html')
	
	oM.makeMenu('top11','','Legals','legals.html')
	
	oM.makeMenu('top12','','Sitemap','sitemap.html')
}
	
oM.construct()

/*
if(bw.ie55 || bw.ie6){
oM.ev.css.filter="alpha(opacity=0);"
oM.ev.css.backgroundColor='red'
}
*/

//Extra test code to customize the CoolMenus - moving the items to totally different positions:
/*
oM.m["top0"].b.moveIt(100,100)
oM.m["top1"].b.moveIt(50,50)
oM.m["top2"].b.moveIt(cmpage.x2-150,cmpage.y2-100)
oM.m["top3"].b.moveIt(500,200)
*/

