var d = new Date(); d.setMonth(d.getMonth()+15);
document.cookie = 'path=/' + '; expires='+d.toGMTString();
function MinMax(imgObj, name) {
	var x = document.all[name].style.display;
	if (x == "block" || x == "") {
		document.all[name].style.display = "none";
		imgObj.alt = " expand ";
		imgObj.src = "/img/menu_arr_down.gif";
		document.cookie = name + '=min; path=/' + '; expires='+d.toGMTString();
	} else {
		document.all[name].style.display = "block";
		imgObj.alt=" collaspe ";
		imgObj.src="/img/menu_arr_up.gif";
		document.cookie = name + '=max; path=/' + '; expires='+d.toGMTString();
	}
}
function initMenu(name, mode) {
	var menuState = getCookie(name);
	if (menuState == "") { menuState = mode; }
	if (menuState == 'min') {
		document.all[name].style.display = "none";
		document.images[name + 'Img'].src = "/img/menu_arr_down.gif";
		document.images[name + 'Img'].alt = " expand ";
		document.cookie=name + '=min; path=/' + '; expires='+d.toGMTString();
	} else {
		document.all[name].style.display = "block";
		document.images[name + 'Img'].src = "/img/menu_arr_up.gif";
		document.images[name + 'Img'].alt = " collapse ";
		document.cookie=name + '=max; path=/' + '; expires='+d.toGMTString();
	}
}
function getCookie(sName) {
	var aCookie=document.cookie.split("; ");
	for (var i=0; i < aCookie.length ; i++) {
		var aCrumb=aCookie[i].split("=");
		if (sName==aCrumb[0]) return unescape(aCrumb[1]);
	}
	return null;
}
function subWindow(newPage,winId, reSize){
	LeftPosition=(screen.width)?(screen.width-560)/2:100;TopPosition=(screen.height)?(screen.height-455)/2:100;
	if (reSize != 'no') { reSize = 'yes' }
	settings='width=560,height=455,top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable='+reSize;
	win=window.open(newPage,winId,settings);
	win.focus();
}
function pcbWindow(newPage,winId, reSize){
	LeftPosition=(screen.width)?(screen.width-560)/2:100;TopPosition=(screen.height)?(screen.height-455)/2:100;
	if (reSize != 'no') { reSize = 'yes' }
	settings='width=560,height=455,top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable='+reSize;
	pcBuildWin=window.open(newPage,winId,settings);
	pcBuildWin.focus();
}
function productWindow(newPage,winId, reSize){
	LeftPosition=(screen.width)?(screen.width-470)/2:100;TopPosition=(screen.height)?(screen.height-540)/2:100;
	if (reSize != 'no') { reSize = 'yes' }
	settings='width=470,height=540,top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable='+reSize;
	win=window.open(newPage,winId,settings);
	win.focus();
}
function menuEvent(name, frame, index, ev){
	var fr = top.frames[frame];
	if (!fr || !fr.CMenus || !fr.CMenus[name]) return;
	var ind = fr.CMenus[name].root.cd[index].index;
	var scrollYOffset = 0; var scrollXOffset = 0;
	if (document.all) { scrollYOffset = fr.document.body.scrollTop; scrollXOffset = fr.document.body.scrollLeft; }
	else if (document.layers || document.getElementById) { scrollYOffset = fr.pageYOffset;	scrollXOffset = fr.pageXOffset; }
	fr.CMenus[name].moveXY(fr.CMenus[name].root.frameoff[1] + scrollXOffset,fr.CMenus[name].root.frameoff[0] + scrollYOffset);
	fr.mEvent(name, ind, ev);
}
function submitForm(form, ss) {
	var i, newURL;
	newURL = form.action;
	for (i=0; i<form.elements.length; i++) {
		if (ss == 'true') {
			newURL += form.elements[i].name + '/' + form.elements[i].value + '/';
		}else{
			newURL += '&' + form.elements[i].name + '=' + form.elements[i].value;
		}		
	}
	window.location = newURL;
}
function isNumeric(num){ 
	var numeric="0123456789"; 
	if(num.length==0){ 
		return true; 
	} 
	for(i=0;i<num.length;i++){ 
		if(numeric.indexOf(num.charAt(i))<0){ 
			return false; 
		} 
	} 
	return true; 
}
function clickIE4() { if (event.button==2) { return false; } }
function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ return false; } } }