function initializeMenuList(){
	this.menuActive=false;
	this.mainMenuArray=new Array(5);
	this.mainMenuAlignment=new Array(5);
	this.mainMenuLayouts=new Array(5);

	this.subMenuArray=new Array(50);
	this.activeMenuArray=new Array(10);
	
	this.mainMenuPointer=0;
	this.subMenuPointer=0;
	this.mainMenuCount=0;
	this.subMenuCount=0;
	this.activeMenuCount=0;
	this.imgOutArray=new Array(50);
	this.imgOverArray=new Array(50);
	this.imac=0;
		
	this.menuReady=false;
	this.menuStatus=1;
};

function mainMenu(layout,spacing,nbgcolor,hbgcolor,nftcolor,hftcolor,bgimage,extension){

	if (menuList.mainMenuCount>0){
		var oldMenu = menuList.mainMenuArray[menuList.mainMenuCount-1];
		this.mainMenuID = oldMenu.mainMenuID  + 1;
	}else{
		this.mainMenuID  = 1;
	}
	

	menuList.mainMenuArray[menuList.mainMenuCount++]=this;
	
	this.htmlBefore='';
	this.htmlAfter='';
	
	this.mtopoffset=5;
	this.mleftoffset=5;

	if(os=="Mac"&&browser=="IE"){
		this.mtopoffset=15;
		this.mleftoffset=10;
	}

	this.smleftoffset=10;

	this.itemArray=new Array(30);
	this.iac=0;
	this.count=1;
	this.name='aj'+menuList.mainMenuCount;
	this.item='';
	this.htmlBeforeItem='';
	this.htmlAfterItem='';
	this.sp_item='';
	this.extension = extension;
	if(arguments.length>=1&&arguments[0]=='vertical'){
		this.layout='vertical';
		menuList.mainMenuLayouts[menuList.mainMenuCount]='vertical';
	}
	else
	{
		this.layout='horizontal';
		menuList.mainMenuLayouts[menuList.mainMenuCount]='horizontal';
	}
	
	if(arguments.length>=2&&arguments[1]!=''){
		this.spacing=spacing;
	}
	else
	{
		this.spacing=0;
	}
	
	
	if(arguments.length>=3&&arguments[2]!=''){
		this.nbgcolor=nbgcolor;
	}
	else
	{
		this.nbgcolor="black";
	}
	
	if(arguments.length>=4&&arguments[3]!=''){
		this.hbgcolor=hbgcolor;
	}
	else
	{
		this.hbgcolor="black";
	}
	
	if(arguments.length>=5&&arguments[4]!=''){
		this.nftcolor=nftcolor;
	}
	else
	{
		this.nftcolor="white";
	}
	
	if(arguments.length>=6&&arguments[5]!=''){
		this.hftcolor=hftcolor;
	}
	else
	{
		this.hftcolor="white";
	}
	
	if(arguments.length>=7&&arguments[6]!=''){
		this.bgimage=bgimage;
		this.nbgcolor='transparent';
	}
	else
	{
		this.bgimage=null;
	}
	
	if(arguments.length>=8&&arguments[7]=='left')
	{
		menuList.mainMenuAlignment[menuList.mainMenuCount]='left';
	}
	else
	{
		menuList.mainMenuAlignment[menuList.mainMenuCount]='right';
	}
	
	this.over_img=new Array(30);
	this.out_img=new Array(30);
	this.pad_1=0;
	this.pad_2=0;
	this.cellpadding=0;
	this.cellspacing=0;
	this.layerpadding=3;
	this.target='_self';
	this.valign='middle';
	this.menuTagExtension='';
	this.itemTagExtension='';
	this.divider='&nbsp;';
	this.fontFamily='Arial';
	this.fontStyle='none';
	this.fontSize='10pt';
	this.fontWeight='none';
	this.textDecoration='none';
	this.style='';
	this.setElementFont=setElementFont;
	this.writeMenu=writeMenu;
	this.addItem=addItem;
	this.addItems=addItems;
	this.addImages=addImages;
	this.addWithoutLink=addWithoutLinkOther;
	this.addWithoutLinkOther=addItemSansLink;
	this.addItemsWithTarget=addItemsWithTarget;
	this.addImagesWithTarget=addImagesWithTarget;
};

function writeMenu(){
	menuList.menuStatus=0;

	document.writeln('<table cellpadding=0 cellspacing="0">');
	document.writeln('<tr><td>'+this.htmlBefore+'</td></tr>');
	document.writeln('<tr><td>');

	if(browser=="NS4"){
		document.writeln('<table ');
		if(this.nbgcolor!='transparent'){
			document.writeln('bgcolor="'+this.nbgcolor+'" ');
		}
		
		if(this.bgimage!=null){
			document.writeln('background="'+this.bgimage+'" ');
		}
		else
		{
			document.writeln('background="" ');
		}
		
		document.writeln('border="0" cellpadding="'+this.cellpadding+'" cellspacing="'+this.cellspacing+'">');
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		document.writeln('<table id="'+this.name+'table" ');
		if(this.nbgcolor!='transparent'){
			document.writeln('bgcolor="'+this.nbgcolor+'" ');
		}
		if(this.bgimage!=null){
			document.writeln('background="'+this.bgimage+'" ');
		}
		
		document.writeln('border="0" cellpadding="'+this.cellpadding+'" cellspacing="'+this.cellspacing+'" onmouseout="menuList.menuActive=false;" onmouseover="menuList.menuActive=true;" '+this.menuTagExtension+'>');
	}
	
	if(this.layout=='vertical'&&this.pad_1!=0){
		document.writeln('<tr><td height="'+this.pad_1+'">&nbsp;</td></tr>');
	}
	
	if(this.layout=='horizontal'){
		document.writeln('<tr>');
		if(this.pad_1!=0){
			document.writeln('<td width="'+this.pad_1+'">&nbsp;</td>');
		}
	}
	
	if(menuList.menuStatus==0){
		document.writeln(this.item);
	}
	
	if(this.layout=='horizontal'){
		if(this.pad_2!=0){
			document.writeln('<td width="'+this.pad_2+'">&nbsp;</td>');
		}
		
		document.writeln('</tr>');
	}
	
	if(this.layout=='vertical'&&this.pad_2!=0){
		document.writeln('<tr><td height="'+this.pad_2+'">&nbsp;</td></tr>');
	}
	
	document.writeln('</table>');
	
	document.writeln('</td></tr>');
	document.writeln('<tr><td>'+this.htmlAfter+'</td></tr>');	
	document.writeln('</table>');

};

function addItem(desc,URL,target,bulletImg,out_img,over_img){
		var me
		if(desc=="Mükemmellik Aşamaları")
		{
			me=true;
		}
			
	var mname=this.name+'mi'+this.count;
	this.style='font-family:'+this.fontFamily+';font-style:'+this.fontStyle+';font-size:'+this.fontSize+';font-weight:'+this.fontWeight+';text-decoration:'+this.textDecoration;
	if(arguments.length<3||arguments[2]==null)
	{
		target=this.target;
	}
	
	if(browser=="NS4"){
		desc='<font color="'+this.nftcolor+'">'+this.htmlBeforeItem+desc+this.htmlAfterItem+'</font>';
	}
	else
	{
		desc=this.htmlBeforeItem+desc+this.htmlAfterItem;
	}
	
	this.item+=this.sp_item;
	
	if(this.layout=='vertical'){
		this.item+='<tr>';
	}
	
	if(browser=="NS4"){
		this.item+='<td  valign="'+this.valign+'"><ilayer id="'+mname+'clip" z-index="28" visibility="hide">';
		this.item+='<a href="'+URL+'" id="'+this.name+'ai'+this.count+'">';
		if(arguments.length==6){
			if(arguments.length>3) this.item+='<img  src="'+bulletImg+'" border="0">';
			this.item+='<font id="'+this.name+'a'+this.count+'" style="'+this.style+';color:'+this.nftcolor+';">'+desc+'</font>&nbsp;';
			this.item+='</font></a>';
			
		}
		else
		{
			this.item+=desc+'</a>';
		}
		this.item+='</ilayer>';
		this.item+='<layer id="'+mname+'" z-index="29" visibility="hide" ';
		if(this.nbgcolor!='transparent')
		{
			this.item+='bgColor="'+this.nbgcolor+'" ';
		}
		this.item+='onmouseover="mainMenuMouseOver('+this.mainMenuID+',\''+this.name+'\',\''+this.count+'\',\''+menuList.mainMenuCount+'\',\''+this.hbgcolor+'\',\''+this.hftcolor+'\',\''+menuList.imac+'\')" onmouseout="mainMenuMouseOut(\''+this.name+'\',\''+this.count+'\',\''+this.nbgcolor+'\',\''+this.nftcolor+'\',\''+menuList.imac+'\')">';
		
		if(arguments.length==6){
			menuList.imgOverArray[menuList.imac]=new Image();
			menuList.imgOverArray[menuList.imac].src=over_img;
			menuList.imgOutArray[menuList.imac]=new Image();
			menuList.imgOutArray[menuList.imac++].src=out_img;
		}
		this.item+='<a href="'+URL+'" id="'+this.name+'a'+this.count+'"';
		if(target!=''){
			this.item+=' target="'+target+'"';
		}
		if(URL==''){
			this.item+=' onclick="return false;"';
		}
		if(arguments.length==6){
			this.item+='><img id="'+this.name+'mi_img'+this.count+'" src="'+out_img+'" border="0"></a>';
		}
		else
		{
			this.item+='>'+desc+'</a>';
		}
		this.item+='</layer></td>';
		this.setElementFont(this.name+'ai'+this.count);
		this.setElementFont(this.name+'a'+this.count);
		this.setElementFont(this.name+'d'+this.count);
	}

	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		var tStr;
		tStr=URL.toLowerCase();
		if(tStr.indexOf("javascript:")==0){
			tStr=URL.substring(11,URL.length);
		}
		else
		{
			if(tStr.indexOf("'")==-1&&tStr.indexOf('"')==-1){
				tStr='window.open(\''+URL+'\',\''+target+'\')';
			}
			else
			{
				tStr='';
			}
		}
		this.item+='<td onclick="'+tStr+'" onmouseover="mainMenuMouseOver('+this.mainMenuID+',\''+this.name+'\',\''+this.count+'\',\''+menuList.mainMenuCount+'\', \''+this.hbgcolor+'\',\''+this.hftcolor+'\',\''+menuList.imac+'\')" onmouseout="mainMenuMouseOut(\''+this.name+'\',\''+this.count+'\', \''+this.nbgcolor+'\',\''+this.nftcolor+'\',\''+menuList.imac+'\');"  valign="'+this.valign+'" '+ this.itemTagExtension +'><div id="'+mname+'clip" style="position:absolute;width:1;height:1"></div>';
		this.item+='<div id="'+mname+'" style="padding:'+this.layerpadding+'px">';
		this.item+='<a href="'+URL+'" style="text-decoration:none"';
		//alert(this.item);
		if(browser!="Opera"){
			this.item+=' onclick="return false;"';
		}
		if(URL==''){
			this.item+=' onmouseover="self.status=\'\';return true;"';
		}
		if(target!=''){
			this.item+=' target="'+target+'"';
		}
		
		if(arguments.length==6){
			this.item+='><table cellpadding=0 cellspacing=0 style="cursor:hand"><tr>';


			if(arguments.length>3) 
				this.item+='<td><img  src="'+bulletImg+'" border="0" align="absbottom">&nbsp;</td>';

			this.item+='<td nowrap><font id="'+this.name+'a'+this.count+'" style="'+this.style+';color:'+this.nftcolor+';">'+desc+'</font>&nbsp;';
			this.item+='</font></a></td>';
			this.item+='</table>';

			menuList.imgOverArray[menuList.imac]=new Image();
			menuList.imgOverArray[menuList.imac].src=over_img;
			menuList.imgOutArray[menuList.imac]=new Image();
			menuList.imgOutArray[menuList.imac++].src=out_img;
		}
		else
		{
			this.item+='><font id="'+this.name+'a'+this.count+'" style="'+this.style+';color:'+this.nftcolor+';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+desc+'</font></a>';
		}
			this.item+='</div></td>';
		}
		
		this.itemArray[this.iac++]=mname;
		if(this.spacing!=0){
			if(this.layout=='vertical'){
				this.sp_item='<tr><td height="'+this.spacing+'"><font size="1pt">&nbsp;</font></td></tr>';
			}
			if(this.layout=='horizontal'){
				if(browser=="IE"||browser=="NS6"||browser=="Opera"){
					this.sp_item='<td width="'+this.spacing+'" align="center"><font color="'+this.nftcolor+'" style="'+this.style+'">'+this.divider+'</font></td>';
				}
				if(browser=="NS4"){
					this.sp_item='<td width="'+this.spacing+'" align="center"><font color="'+this.nftcolor+'" id="'+this.name+'d'+this.count+'">'+this.divider+'</font></td>';
				}
			}
		}
		if(this.layout=='vertical'){this.item+='</tr>';
	}
	//alert(this.item);
	
	this.count++;
};
			
function addItemSansLink(desc){
	var mname=this.name+'mi'+this.count;
	this.style='font-family:'+this.fontFamily+';font-style:'+this.fontStyle+';font-size:'+this.fontSize+';font-weight:'+this.fontWeight+';text-decoration:'+this.textDecoration;
	if(browser=="NS4"){
		desc=this.htmlBeforeItem+'<font color="'+this.nftcolor+'">'+desc+'</font>'+this.htmlAfterItem;
	}
	else{
		desc=this.htmlBeforeItem+desc+this.htmlAfterItem;
	}
	
	this.item+=this.sp_item;
	if(this.layout=='vertical'){
		this.item+='<tr>';
	}
		
	if(browser=="NS4"){
		this.item+='<td valign="'+this.valign+'"><ilayer id="'+mname+'clip" z-index="28" visibility="hide">';
		this.item+=desc;
		this.item+='</ilayer>';
		this.item+='<layer id="'+mname+'" z-index="29" visibility="hide" ';
		if(this.nbgcolor!='transparent'){
			this.item+='bgColor="'+this.nbgcolor+'" ';
		}
			
		this.item+='>';
		this.setElementFont(mname+'clip');
		this.setElementFont(mname);
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		this.item+='<td  valign="'+this.valign+'" ' + this.itemTagExtension+'><div id="'+mname+'clip" style="position:absolute;width:1;height:1"></div>';
		this.item+='<div id="'+mname+'" style="padding:'+this.layerpadding+'px; color:'+this.nftcolor+'">';
	}
	
	this.item+=desc;
	if(browser=="NS4"){
		this.item+='</layer></td>';
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		this.item+='</div></td>';
	}
	
	this.itemArray[this.iac++]=mname;
	if(this.spacing!=0){
		if(this.layout=='vertical'){
			this.sp_item='<tr><td height="'+this.spacing+'"><font style="font-size:1pt">&nbsp;</font></td></tr>';
		}
		
		if(this.layout=='horizontal'){
			this.sp_item='<td width="'+this.spacing+'" align="center"><font color="'+this.nftcolor+'" style="'+this.style+'">'+this.divider+'</font></td>';
		}
	}
	
	if(this.layout=='vertical'){
		this.item+='</tr>';
	}
	
	//alert(this.sp_item);
	
	this.count++;
};


function mainMenuMouseOver(mainMenuID,name,count,mainMenuCount,bgcolor,ftcolor,img){
	var left;
	var top;
	var nm1=name+'sm'+count;
	var nm2=name+'mi'+count;
	
	
	var thismenu = menuList.mainMenuArray[mainMenuID-1];
	
	if(browser!="Opera"){
		setLayerBgColor(nm2,bgcolor);
		setLayerFgColor(name+'a'+count,ftcolor);
	}
	setMenuVisibility();
	if(browser=="NS4"){
		if(layerExists(nm1)){
			menuList.activeMenuArray[menuList.activeMenuCount++]=nm1;
			if(menuList.mainMenuLayouts[mainMenuCount]=="horizontal"){
				left=getLayerOffsetLeft(nm2);
				top=getLayerOffsetTop(nm2)+getLayerOffsetHeight(nm2);
				setLayerLeft(nm1,left);
				setLayerTop(nm1,top);
			}
			if(menuList.mainMenuLayouts[mainMenuCount]=="vertical"){
				if(menuList.mainMenuAlignment[mainMenuCount]=='right'){
					left=getLayerOffsetLeft(nm2)+getLayerOffsetWidth(nm2);
					setLayerLeft(nm1,left);
				}
				else
				{
					left=getLayerOffsetLeft(nm2)-getLayerOffsetWidth(nm1);
					setLayerLeft(nm1,left);
				}
				top=getLayerOffsetTop(nm2);
				setLayerTop(nm1,top);
			}
		}
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		if(layerExists(nm1)){
			menuList.activeMenuArray[menuList.activeMenuCount++]=nm1;
			if(menuList.mainMenuLayouts[mainMenuCount]=="horizontal"){
				top=getLayerOffsetTop(nm2+'clip')+getLayerOffsetHeight(nm2)+thismenu.mtopoffset;
				left=getLayerOffsetLeft(nm2+'clip')+thismenu.mleftoffset;
				if(browser=="Opera"){
					top+=2;
				}
				setLayerTop(nm1,top);
				setLayerLeft(nm1,left);
			}
			if(menuList.mainMenuLayouts[mainMenuCount]=="vertical"){
				left=getLayerOffsetLeft(nm2+'clip')+thismenu.mleftoffset;
				if(menuList.mainMenuAlignment[mainMenuCount]=='right'){
					left+=getLayerOffsetWidth(nm2);
				}
				else{
					left-=getLayerOffsetWidth(nm1);
				}
				top=getLayerOffsetTop(nm2+'clip')+thismenu.mtopoffset;
				setLayerTop(nm1,top);
				setLayerLeft(nm1,left);
			}
		}
	}
	
	if(browser=="NS4"&&img!="undefined"&&document.layers[nm2].document.images.length!=0){
		document.layers[nm2].document.images[0].src=menuList.imgOverArray[img].src;
	}
	if((browser=="IE"||browser=="NS6"||browser=="Opera")&&document.images[name+'mi_img'+count]){
		document.images[name+'mi_img'+count].src=menuList.imgOverArray[img].src;
	}
	menuList.menuActive=true;
	if(layerExists(nm1)){
		if(left<winPageXOffset2()){
			setLayerLeft(nm1,winPageXOffset2());
		}
		if(left+getLayerOffsetWidth(nm1)>winPageXOffset()){
			setLayerLeft(nm1,winPageXOffset()-getLayerOffsetWidth(nm1));
		}
		if(top<winPageYOffset()){
			setLayerTop(nm1,winPageYOffset());
		}
		if(top+getLayerOffsetHeight(nm1)>winPageYOffset2()){
			setLayerTop(nm1,winPageYOffset2()-getLayerOffsetHeight(nm1));
		}
	}
	
	setLayerVisibility(nm1,true);
};


function mainMenuMouseOut(name,count,bgcolor,ftcolor,img){
	if(browser!="Opera"){
		setLayerBgColor(name+'mi'+count,bgcolor);
		setLayerFgColor(name+'a'+count,ftcolor);
	}
	menuList.menuActive=false;
	if(browser=="NS4"&&img!="undefined"&&document.layers[name+'mi'+count].document.images.length!=0){
		document.layers[name+'mi'+count].document.images[0].src=menuList.imgOutArray[img].src;
	}
	if((browser=="IE"||browser=="NS6"||browser=="Opera")&&document.images[name+'mi_img'+count]){
		document.images[name+'mi_img'+count].src=menuList.imgOutArray[img].src;
	}
	setTimeout("setMenuVisibility()",300);
};

function subMenu(mMenuID,menuName,nbgcolor,hbgcolor,nftcolor,hftcolor,bgimage){
	menuList.subMenuArray[menuList.subMenuCount++]=this;
	
	this.mainMenuID=mMenuID;
	
	this.itemArray=new Array(50);
	this.iac=0;
	if(arguments.length>=3&&arguments[2]!=''){
		this.nbgcolor=nbgcolor;
	}
	else
	{
		this.nbgcolor="black";
	}
	if(arguments.length>=4&&arguments[3]!=''){
		this.hbgcolor=hbgcolor;
	}
	else{
		this.hbgcolor="black";
	}
	if(arguments.length>=5&&arguments[4]!=''){
		this.nftcolor=nftcolor;
	}
	else{
		this.nftcolor="white";
	}
	if(arguments.length>=6&&arguments[5]!=''){
		this.hftcolor=hftcolor;
	}
	else{
		this.hftcolor="white";
	}
	
	if(arguments.length>=7&&arguments[6]!=''){
		this.bgimage=bgimage;
		this.nbgcolor='transparent';
	}
	else{
		this.bgimage=null;
	}
	this.fontFamily='Arial';
	this.fontStyle='none';
	this.fontSize='10pt';
	this.fontWeight='none';
	this.textDecoration='none';
	this.style='';
	this.setElementFont=setElementFont;
	this.name="aj"+menuList.mainMenuCount+"sm"+menuName;
	this.count=1;
	this.item='';
	this.htmlBeforeItem='&nbsp;&nbsp;';
	this.htmlAfterItem='&nbsp;&nbsp;';
	this.cellpadding=0;
	this.cellspacing=0;
	this.layerpadding=0;
	this.menuTagExtension='';
	this.itemTagExtension='';
	this.target='_self';
	this.writeMenu=writeSubMenu;
	this.addItem=addSubItem;
	this.addItems=addItems;
	this.addWithoutLink=addWithoutLinkOther;
	this.addWithoutLinkOther=addSubItemSansLink;
	this.addItemsWithTarget=addItemsWithTarget;
};

function writeSubMenu(){
	if(browser=="NS4"){
		document.writeln('<layer id="'+this.name+'" ');
		if(this.nbgcolor!='transparent'){
			document.writeln('bgColor="'+this.nbgcolor+'" ');
		}
		if(this.bgimage!=null){
			document.writeln('background="'+this.bgimage+'" ');
		}
		document.writeln('visibility="hide" z-index="30" onmouseout="menuList.menuActive=false;" onmouseover="menuList.menuActive=true;">');
		document.writeln('<layer visibility="hide"></layer>');
		document.writeln('<table border="0" cellspacing="'+this.cellspacing+'" cellpadding="'+this.cellpadding+'" background="" ');
		if(this.nbgcolor!='transparent'){
			document.writeln('bgColor="'+this.nbgcolor+'" ');
		}
		document.writeln('>');
		document.writeln(this.item);
		document.writeln('</table>');
		document.writeln('</layer>');
	}
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		document.writeln('<div align="left" id="'+this.name+'" style="position:absolute;background-color:'+this.nbgcolor+';z-index:30;visibility:hidden" '+this.menuTagExtension+' onmouseout="menuList.menuActive=false;" onmouseover="menuList.menuActive=true;" style="z-index:1000">');
		document.writeln('<table border="0" style="left:0;top:0" cellspacing="'+this.cellspacing+'" cellpadding="'+this.cellpadding+'" ');
		if(this.bgimage!=null){
			document.writeln('background="'+this.bgimage+'" ');
		}
		document.writeln('id="'+this.name+'table">'+this.item+'</table></div>');
	}
	if(browser=="NS6"||(browser=="IE"&&version==4)){
		getLayerWidth(this.name,getLayerOffsetWidth(this.name+'table'));
	}
};


function addSubItem(desc,URL,target,bulletImg){
	
	this.style='font-family:'+this.fontFamily+';font-style:'+this.fontStyle+';font-size:'+this.fontSize+';font-weight:'+this.fontWeight+';text-decoration:'+this.textDecoration;
	if(arguments.length<3){
		target=this.target;
	}

	desc=this.htmlBeforeItem+desc+this.htmlAfterItem;
	var mname=this.name+'itm'+this.count;
	if(browser=="NS4"){
		this.item+='<tr><td valign="middle" nowrap>';
		this.item+='<ilayer z-index="29" id="'+mname+'clip" visibility="hide">'+desc+'</ilayer>';
		this.item+='<layer z-index="30" id="'+mname+'" ';
		if(this.nbgcolor!='transparent'){
			this.item+='bgColor="'+this.nbgcolor+'" ';
		}
		this.item+='width="350" onmouseover="subMenuMouseOver('+this.mainMenuID+',\''+this.name+'\',\''+this.count+'\',\''+this.hbgcolor+'\',\''+this.hftcolor+'\',\''+menuList.mainMenuCount+'\')" onmouseout="subMenuMouseOut(\''+this.name+'\',\''+this.count+'\',\''+this.nbgcolor+'\',\''+this.nftcolor+'\')"><a id="'+mname+'a" href="'+URL+'"';
		if(target!=''){
			this.item+=' target="'+target+'"';
		}
		if(URL==''){
			this.item+=' onclick="return false;"';
		}
		this.item+='>';
		if(arguments.length>3) this.item+='<img  src="'+bulletImg+'" border="0">';		
		this.item+='<font color="'+this.nftcolor+'">'+desc+'</font>';
		this.item+='</a></layer>'

		this.item+='</td></tr>';
		this.itemArray[this.iac++]=mname;
		this.setElementFont(mname);
		this.setElementFont(mname+'clip');
		this.setElementFont(mname+'a');
	}

	if(browser=="IE"||browser=="NS6"||browser=="Opera"){

		var tStr;
		tStr=URL.toLowerCase();
		if(tStr.indexOf("javascript:")==0){
			tStr=URL.substring(11,URL.length);
		}
		else{
			if(tStr.indexOf("'")==-1&&tStr.indexOf('"')==-1){
				tStr='window.open(\''+URL+'\',\''+target+'\')';
			}
			else
			{
				tStr='';
			}
		}
		this.item+='<tr><td valign="middle" nowrap onclick="'+tStr+'" onmouseover="subMenuMouseOver('+this.mainMenuID+',\''+this.name+'\', \''+this.count+'\',\''+this.hbgcolor+'\',\''+this.hftcolor+'\',\''+menuList.mainMenuCount+'\')" onmouseout="subMenuMouseOut(\''+this.name+'\', \''+this.count+'\',\''+this.nbgcolor+'\',\''+this.nftcolor+'\')" '+this.itemTagExtension+' nowrap><div id="'+mname+'clip" style="position:absolute;width:1;height:1"></div>';
		this.item+='<div id="'+mname+'" style="padding:'+this.layerpadding+'px">';
		this.item+='<table cellpadding=0 cellspacing=0><tr>';
		if(arguments.length>3) this.item+='<td><img  src="'+bulletImg+'" border="0"></td>';
		this.item+='<td nowrap><a href="'+URL+'" style="text-decoration:none"';
		if(browser!="Opera"){
			this.item+=' onclick="return false;"';
		}

		if(target!=''){
			this.item+=' target="'+target+'"';
		}
		this.item+='>';
		this.item+='<font id="'+this.name+'a'+this.count+'" style="'+this.style+';color:'+this.nftcolor+';">'+desc+'</font>';
		this.item+='</a></td>';
		this.item+='</table></div></td></tr>';
		
	}
	this.item+='\n\n';	
	this.count++;
};


function addSubItemSansLink(desc){
	this.style='font-family:'+this.fontFamily+';font-style:'+this.fontStyle+';font-size:'+this.fontSize+';font-weight:'+this.fontWeight+';text-decoration:'+this.textDecoration;
	if(browser=="NS4"){
		desc=this.htmlBeforeItem+'<font color="'+this.nftcolor+'">'+desc+'</font>'+this.htmlAfterItem;
	}
	else{
		desc=this.htmlBeforeItem+desc+this.htmlAfterItem;
	}
	var mname=this.name+'itm'+this.count;
	if(browser=="NS4"){
		this.item+='<tr><td valign="middle" nowrap>';
		this.item+='<ilayer z-index="29" id="'+mname+'clip" visibility="hide">'+desc+'</ilayer>';
		this.item+='<layer z-index="30" id="'+mname+'" ';
		if(this.nbgcolor!='transparent'){
			this.item+='bgColor="'+this.nbgcolor+'" ';
		}
		this.item+='width="350">'+desc+'</layer>';
		this.item+='</td></tr>';
		this.itemArray[this.iac++]=mname;
		this.setElementFont(mname+'clip');
		this.setElementFont(mname);
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		this.item+='<tr><td valign="middle" nowrap '+this.itemTagExtension+'><div id="'+mname+'clip" style="position:absolute;width:1;height:1"></div>';
		this.item+='<div id="'+mname+'" style="'+this.style+';padding:'+this.layerpadding+'px;color:'+this.nftcolor+'">'+desc+'</div></td></tr>';
	}
	this.count++;
};


function subMenuMouseOver(mMenuID, name,count,bgcolor,fgcolor,mainMenuCount){
	var tmp_activeMenuCount=menuList.activeMenuCount;
	var left;
	var top;
	var nm1=name+'i'+count;
	var nm2=name+'itm'+count;

	var thismenu;

	for(var i=0;i<menuList.mainMenuCount;i++){
		if (menuList.mainMenuArray[i].mainMenuID == mMenuID ) thismenu = menuList.mainMenuArray[i];
	}

	
	for(var i=0;i<tmp_activeMenuCount;i++){
		if(menuList.activeMenuArray[i]!=name){
			if(nm1.indexOf(menuList.activeMenuArray[i])==-1){
				setLayerVisibility(menuList.activeMenuArray[i],false);
				menuList.activeMenuCount--;
			}
		}
	}
	
	if(browser!="Opera"){
		setLayerBgColor(nm2,bgcolor,name);
		setLayerFgColor(name+'a'+count,fgcolor,name);
	}
	
	if(browser=="NS4"){
		if(layerExists(nm1)){
			menuList.activeMenuArray[menuList.activeMenuCount++]=nm1;
			if(menuList.mainMenuAlignment[mainMenuCount]=='right'){
				left=getLayerOffsetLeft(name)+getLayerOffsetWidth(name)+thismenu.smleftoffset;
				setLayerLeft(nm1,left);
			}
			else
			{
				if(getLayerOffsetLeft(name)-getLayerOffsetWidth(nm1)-thismenu.smleftoffset>0){
					left=getLayerOffsetLeft(name)-getLayerOffsetWidth(nm1)-thismenu.smleftoffset;
					setLayerLeft(nm1,left);
				}
				else
				{
					left=0;
					setLayerLeft(nm1,0);
				}
			}
			top=getLayerOffsetTop(nm2,name);
			setLayerTop(nm1,top);
		}
	}
	
	if(browser=="IE"||browser=="NS6"||browser=="Opera"){
		if(layerExists(nm1)){
			menuList.activeMenuArray[menuList.activeMenuCount++]=nm1;
			if(menuList.mainMenuAlignment[mainMenuCount]=='right'){
				left=getLayerLeft(name)+getLayerOffsetWidth(name)+thismenu.smleftoffset+thismenu.mleftoffset;
				setLayerLeft(nm1,left);
			}
			else
			{
				left=getLayerLeft(name)-getLayerOffsetWidth(nm1)-thismenu.smleftoffset;
				setLayerLeft(nm1,left);
			}
			
			if(browser=="IE"){
				top=getLayerOffsetTop(name)+getLayerOffsetTop(nm2+'clip')+thismenu.mtopoffset;
				setLayerTop(nm1,top);
			}
			
			if(browser=="NS6"){
				if(version==6.1){
					top=getLayerOffsetTop(name)+getLayerOffsetTop(nm2+'clip');
					setLayerTop(nm1,top);
				}
				else{
					top=getLayerOffsetTop(nm2+'clip');
					setLayerTop(nm1,top);
				}
			}
			
			
			if(browser=="Opera"){
				top=getLayerOffsetTop(name)+getLayerOffsetTop(nm2+'clip');
				setLayerTop(nm1,top);
			}
		}
	}
	
	if(layerExists(nm1)){
		if(left<winPageXOffset2()){
			setLayerLeft(nm1,winPageXOffset2());
		}
		if(left+getLayerOffsetWidth(nm1)>winPageXOffset()){
			setLayerLeft(nm1,winPageXOffset()-getLayerOffsetWidth(nm1));
		}
		if(top<winPageYOffset()){
			setLayerTop(nm1,winPageYOffset());
		}
		if(top+getLayerOffsetHeight(nm1)>winPageYOffset2()){
			setLayerTop(nm1,winPageYOffset2()-getLayerOffsetHeight(nm1));
		}
		setLayerVisibility(nm1,true);
	}
	
	menuList.menuActive=true;
};


function subMenuMouseOut(name,count,bgcolor,fgcolor){
	if(browser!="Opera"){
		setLayerBgColor(name+'itm'+count,bgcolor,name);
		setLayerFgColor(name+'a'+count,fgcolor,name);
	}
	setTimeout("setMenuVisibility()",300);
};


function setElementFont(element){
	document.ids[element].fontFamily=this.fontFamily;
	document.ids[element].fontSize=this.fontSize;
	document.ids[element].fontStyle=this.fontStyle;
	document.ids[element].fontWeight=this.fontWeight;
	document.ids[element].textDecoration=this.textDecoration;
};


function addItems(){
	for(var i=0;i<arguments.length;i+=2){
		this.addItem(arguments[i],arguments[i+1]);
	}
};

function addWithoutLinkOther(){
	for(var i=0;i<arguments.length;i++){
		this.addWithoutLinkOther(arguments[i]);
	}
};

function addImages(){
	for(var i=0;i<arguments.length;i+=3){
		this.addItem(null,arguments[i],null,arguments[i+1],arguments[i+2]);
	}
};

function addImagesWithTarget(){
	for(var i=0;i<arguments.length;i+=4){
		this.addItem(null,arguments[i],arguments[i+1],arguments[i+2],arguments[i+3]);
	}
};

function addItemsWithTarget(){
	for(var i=0;i<arguments.length;i+=3){
		this.addItem(arguments[i],arguments[i+1],arguments[i+2]);
	}
};

function setMenuVisibility(){
	if(!menuList.menuActive){
		for(var i=0;i<menuList.activeMenuCount;i++){
			setLayerVisibility(menuList.activeMenuArray[i],false);
		}
		menuList.activeMenuCount=0;
	}
};


function reloadMenu(){
	if((browser=="NS6"&&version==6.1)||browser=="IE"){
		for(var i=0;i<menuList.subMenuCount;i++){
			var menu=menuList.subMenuArray[i];
			var name=menu.name;
			var count=name.substring(name.indexOf("aj")+2,name.indexOf("sm"));
			setLayerVisibility(name,false);
			if(name.indexOf("i")==-1){
				var t_name=name.replace("sm","mi");
				var main_menu=menuList.mainMenuArray[parseInt(count)-1];
				if(main_menu.layout=='vertical'){
					if(menuList.mainMenuAlignment[parseInt(count)]=='right'){
						setLayerLeft(name,getLayerOffsetLeft(t_name+'clip')+getLayerOffsetWidth(t_name));
					}
					else
					{
						setLayerLeft(name,getLayerOffsetLeft(t_name+'clip')-getLayerOffsetWidth(t_name));
					}
					setLayerTop(name,getLayerOffsetTop(t_name+'clip'));
				}
				if(main_menu.layout=='horizontal'){
					setLayerLeft(name,getLayerOffsetLeft(t_name+'clip'));
					setLayerTop(name,getLayerOffsetTop(t_name+'clip')+getLayerOffsetHeight(t_name));
				}
			}
			else{
				var t_name=name.substring(0,name.lastIndexOf("i"));
				var u_name=t_name+"itm"+name.substring(name.lastIndexOf("i")+1)+"clip";
				if(menuList.mainMenuAlignment[parseInt(count)]=='right'){
					setLayerLeft(name,getLayerOffsetLeft(t_name)+getLayerOffsetWidth(t_name)+thismenu.smleftoffset);
				}
				else
				{
					setLayerLeft(name,getLayerOffsetLeft(t_name)-getLayerOffsetWidth(name)-thismenu.smleftoffset);
				}
				setLayerTop(name,getLayerOffsetTop(t_name)+getLayerOffsetTop(u_name));
			}
		}
	}
	
	
	if(browser=="NS4"){
		for(var i=0;i<menuList.mainMenuCount;i++){
			var menu=menuList.mainMenuArray[i];
			var width=0;
			var height=0;
			if(menu.layout=='vertical'){
				for(var j=0;j<menu.iac;j++){
					if(getLayerOffsetWidth(menu.itemArray[j]+'clip')>width){
						width=getLayerOffsetWidth(menu.itemArray[j]+'clip');
					}
				}
			}
			
			for(var j=0;j<menu.iac;j++){
				if(menu.layout=='horizontal'){
					width=getLayerOffsetWidth(menu.itemArray[j]+'clip');
				}
				getLayerWidth(menu.itemArray[j],width);
				setLayerLeft(menu.itemArray[j],getLayerOffsetLeft(menu.itemArray[j]+'clip'));
				setLayerTop(menu.itemArray[j],getLayerOffsetTop(menu.itemArray[j]+'clip'));
				setLayerVisibility(menu.itemArray[j],true);
			}
		}
		
		
		for(var i=0;i<menuList.subMenuCount;i++){
			var menu=menuList.subMenuArray[i];
			var width=0;
			for(var j=0;j<menu.iac;j++){
				if(getLayerOffsetWidth(menu.itemArray[j]+'clip',menu.name)>width){
					width=getLayerOffsetWidth(menu.itemArray[j]+'clip',menu.name);
				}
			}
			getLayerWidth(menu.name,width+2);
			for(var j=0;j<menu.iac;j++){
				getLayerWidth(menu.itemArray[j],width,menu.name);
				setLayerLeft(menu.itemArray[j],1,menu.name);
				setLayerTop(menu.itemArray[j],getLayerOffsetTop(menu.itemArray[j]+'clip',menu.name)-getLayerOffsetTop(menu.name),menu.name);
			}
		}
	}
};



function winPageXOffset(){
	if(browser=="NS4"||browser=="NS6"||browser=="Opera"){
		return(window.innerWidth+window.pageXOffset);
	}
	
	if(browser=="IE"){
		return(document.body.clientWidth+document.body.scrollLeft);
	}
};

function winPageXOffset2(){
	if(browser=="NS4"||browser=="NS6"||browser=="Opera"){
		return(window.pageXOffset);
	}
	
	if(browser=="IE"){
		return(document.body.scrollLeft);
	}
};

function winPageYOffset(){
	if(browser=="NS4"||browser=="NS6"||browser=="Opera"){
		return(window.pageYOffset);
	}
	if(browser=="IE"){
		return(document.body.scrollTop);
	}
};

function winPageYOffset2(){
	if(browser=="NS4"||browser=="NS6"||browser=="Opera"){
		return(window.innerHeight+window.pageYOffset);
	}
	if(browser=="IE"){
		return(document.body.clientHeight+document.body.scrollTop);
	}
};


function winOnResize(){
	if(browser=='NS4'&&origWidth==window.innerWidth&&origHeight==window.innerHeight){
		return;
	}
};

function createMainMenuList(){
	for(var i=menuList.mainMenuPointer;i<menuList.mainMenuCount;i++){
		menuList.mainMenuArray[i].writeMenu();
	}
	menuList.mainMenuPointer=menuList.mainMenuCount;
};


function createSubMenuList(){
	for(var i=menuList.subMenuPointer;i<menuList.subMenuCount;i++){
		menuList.subMenuArray[i].writeMenu();
	}
	menuList.subMenuPointer=menuList.subMenuCount;
};


window.onresize=winOnResize;
origWidth=window.innerWidth;
origHeight=window.innerHeight;
browser=getBrowser();
os=getOS();
menuList=new initializeMenuList();


