//first, get the window width to be used in the menu calcs
var myWidth = 0
var myHeight = 0;
var ie;

if (typeof(window.innerWidth) == 'number') {
	//Non-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
	ie = false;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
	//IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth + 19;
	myHeight = document.documentElement.clientHeight;
	ie = true;
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
	//IE 4 compatible
	myWidth = document.body.clientWidth + 19;
	myHeight = document.body.clientHeight;
	ie = true;
}

//for debugging purposes
//window.alert( 'Width = ' + myWidth );
//window.alert( 'Height = ' + myHeight );

var designWidth = 786; // including body margins
var pixelsFromLeft;

if (myWidth > designWidth) {
	if (ie == false) {
	pixelsFromLeft = myWidth / 2 - 119;
	}else{
	pixelsFromLeft = myWidth / 2 - 122;
	}

	if (ie && (myWidth % 2 == 1)) {
		pixelsFromLeft++;
	}
	/*
	if ((!ie && (myWidth % 2 == 1)) || (ie && (myWidth % 2 == 0))) {
		pixelsFromLeft--;
	}
	*/
}
else {
	pixelsFromLeft = 284;
}



//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 0

//Menu properties
oCMenu.pxBetween=0
oCMenu.fromLeft=pixelsFromLeft;
oCMenu.fromTop=20
oCMenu.rows=1
oCMenu.menuPlacement=""

if( navigator.appName == 'Netscape' ){
	oCMenu.fromLeft = pixelsFromLeft;
}



oCMenu.offlineRoot=""
oCMenu.onlineRoot=""
oCMenu.resizeCheck=1
oCMenu.wait=500
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="494"
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=110
oCMenu.level[0].height=25
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=-1
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"

oCMenu.level[1]=new cm_makeLevel()
oCMenu.level[1].width=oCMenu.level[0].width-2
oCMenu.level[1].height=22
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+53
oCMenu.level[1].offsetY=-1
oCMenu.level[1].borderClass="clLevel1border"

oCMenu.level[2]=new cm_makeLevel()
oCMenu.level[2].width=oCMenu.level[0].width-2
oCMenu.level[2].height=22
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderX=1
oCMenu.level[2].borderY=1
oCMenu.level[2].align="right"
oCMenu.level[2].offsetX=-(oCMenu.level[0].width-2)/2+53
oCMenu.level[2].offsetY=-1
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','','','about.cfm','','66','26','images/m_about.gif','images/m_about_on.gif');
	oCMenu.makeMenu('sub0_1','top0','Overview','about.cfm','','200','25');
	oCMenu.makeMenu('sub0_2','top0','What Distinguishes MSGT','/about_distinguishes.cfm','','200','25');
	oCMenu.makeMenu('sub0_3','top0','Management & Staff','/about_staff.cfm','','200','25');
	oCMenu.makeMenu('sub0_4','top0','History','/about_history.cfm','','200','25');
	oCMenu.makeMenu('sub0_5','top0','News','/about_news.cfm','','200','25');

oCMenu.makeMenu('top1','','','/biotech_specialty.cfm','','113','26','images/m_biotech.gif','images/m_biotech_on.gif');
	oCMenu.makeMenu('sub1_1','top1','Specialty Gases & Cryogenics &raquo;','/biotech_specialty.cfm','','200','25');
		oCMenu.makeMenu('sub1_1_1','sub1_1','Overview','/biotech_specialty.cfm','','200','25');
		oCMenu.makeMenu('sub1_1_2','sub1_1','MicroBulk Gases','/biotech_specialty_microbulk.cfm','','200','25');
		oCMenu.makeMenu('sub1_1_3','sub1_1','Bulk Gases','/biotech_specialty_bulk.cfm','','200','25');
		oCMenu.makeMenu('sub1_1_4','sub1_1','MSDS Sheets','/biotech_specialty_msds.cfm','','200','25');
		oCMenu.makeMenu('sub1_1_5','sub1_1','Full Installation & Service','/biotech_specialty_install.cfm','','200','25');
	oCMenu.makeMenu('sub1_2','top1','Extended Service Offerings &raquo;','/biotech_service.cfm','','200','25');
		oCMenu.makeMenu('sub1_2_1','sub1_2','Cyl-Tel Wireless System','/biotech_service_cyltel.cfm','','200','25');
		oCMenu.makeMenu('sub1_2_2','sub1_2','Preventative Maintenance<br>(Sensing Devices)','/biotech_service_sensing.cfm','','200','35');
		oCMenu.makeMenu('sub1_2_3','sub1_2','Preventative Maintenance<br>(CryoStorage)','/biotech_service_cryostorage.cfm','','200','35');
		oCMenu.makeMenu('sub1_2_4','sub1_2','Cylinder Gas Handling<br>Safety Program','/biotech_service_cylsafety.cfm','','200','35');
		oCMenu.makeMenu('sub1_2_5','sub1_2','Lab Gas Purity Audit','/biotech_service_purityaudit.cfm','','200','25');
		oCMenu.makeMenu('sub1_2_6','sub1_2','Cylinder BarCode<br>Tracking Capability','/biotech_service_barcode.cfm','','200','35');
	oCMenu.makeMenu('sub1_3','top1','Products &raquo;','/biotech_products.cfm','','200','25');
		oCMenu.makeMenu('sub1_3_1','sub1_3','Specialty Gas Equipment','/t-specialty-gases-equipment.aspx','','200','25');
		oCMenu.makeMenu('sub1_3_2','sub1_3','CryoStorage Equipment','/biotech_products_cryostorage.cfm','','200','25');
		oCMenu.makeMenu('sub1_3_3','sub1_3','Quality Assurance','/biotech_quality.cfm','','200','25');
	oCMenu.makeMenu('sub1_4','top1','Product Literature','/biotech_prodlit.cfm','','200','25');
	oCMenu.makeMenu('sub1_5','top1','Biotech Clients Served','/biotech_clients.cfm','','200','25');
	oCMenu.makeMenu('sub1_6','top1','Articles','/articles.cfm','','200','25');

oCMenu.makeMenu('top2','','','/welding.cfm','','143','26','images/m_welding.gif','images/m_welding_on.gif');
	oCMenu.makeMenu('sub2_1','top2','Overview','/welding.cfm','','200','25');
	oCMenu.makeMenu('sub2_2','top2','Industrial Gases &raquo;','/welding_industrial.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_1','sub2_2','Overview','/welding_industrial.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_2','sub2_2','MicroBulk Gases','/welding_industrial_microbulk.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_3','sub2_2','Bulk Gases','/welding_industrial_bulk.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_4','sub2_2','Laser Gases','/welding_industrial_laser.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_5','sub2_2','MSDS Sheets','/welding_industrial_msds.cfm','','200','25');
		oCMenu.makeMenu('sub2_2_6','sub2_2','Full Installation & Service','/welding_industrial_install.cfm','','200','25');
	oCMenu.makeMenu('sub2_3','top2','Extended Service Offerings &raquo;','/welding_service.cfm','','200','25');
		oCMenu.makeMenu('sub2_3_2','sub2_3','Preventative Maintenance<br>Program','/welding_service_prevmain.cfm','','200','35');
		oCMenu.makeMenu('sub2_3_3','sub2_3','Demo Request / Equip.<br>Consultation Form','/welding_service_demoreq.cfm','','200','35');
		oCMenu.makeMenu('sub2_3_4','sub2_3','Onsite Cost Reduction<br>Request Form','/welding_service_costreduction.cfm','','200','35');
		oCMenu.makeMenu('sub2_3_5','sub2_3','Onsite Safety Training','/welding_service_safetytraining.cfm','','200','25');
	oCMenu.makeMenu('sub2_4','top2','Products - Welding Equipment','/welding_products_welding.cfm','','200','25');
	oCMenu.makeMenu('sub2_5','top2','Product Literature','/welding_prodlit.cfm','','200','25');

oCMenu.makeMenu('top3','','','/c-4-product-categories.aspx','','69','26','images/m_order.gif','images/m_order_on.gif');
	oCMenu.makeMenu('sub3_1','top3','Specialty Gases Equipment','/t-specialty-gases-equipment.aspx','','200','25');
	oCMenu.makeMenu('sub3_4','top3','Welding Products &amp; Supplies &raquo;','/c-3-welding-products.aspx','','200','25');
		oCMenu.makeMenu('sub3_4_0','sub3_4','Auto Darkening Welding Helmets','c-7-auto-darkening-welding-helmets.aspx','','200','25');
		oCMenu.makeMenu('sub3_4_1','sub3_4','Fume Extracting','c-6-fume-extracting.aspx','','200','25');
		oCMenu.makeMenu('sub3_4_2','sub3_4','Miller','c-2-miller-electric.aspx','','200','25');
		oCMenu.makeMenu('sub3_4_4','sub3_4','Rental Equipment','welding_rentalequip.cfm','','200','25');
		oCMenu.makeMenu('sub3_4_5','sub3_4','Seasonal Sales','c-28-seasonal-sales.aspx','','200','25');
	oCMenu.makeMenu('sub3_5','top3','Search Online Store','search.aspx','','200','25');
	oCMenu.makeMenu('sub3_7','top3','Seasonal Sales','c-28-seasonal-sales.aspx','','200','25');

oCMenu.makeMenu('top4','','','','','103','26','images/m_contact.gif','images/m_contact_on.gif');
	//oCMenu.makeMenu('sub4_1','top4','Overview','contact.cfm','','200','25');
	oCMenu.makeMenu('sub4_2','top4','Contact Form','contact_form.cfm','','200','25');
	oCMenu.makeMenu('sub4_3','top4','Directions to all Facilities','contact_directions.cfm','','200','25');
	oCMenu.makeMenu('sub4_4','top4','Request a Quote','contact_quote.cfm','','200','25');



//Leave this line - it constructs the menu
oCMenu.construct()
