/* Turn on and off list bullets */
var class_bul_on = "bullet_on";
var class_bul_off = "bullet_off";
var class_bul_cur = "bullet_current";
function flip(curObject){	
	if(curObject.className != class_bul_cur){
		if(curObject.className == class_bul_off){
			curObject.className = class_bul_on;
		}
		else{
			curObject.className = class_bul_off;
		}
	}
}

function StyleSheetChanger(cssClassName,toChange,changeTo){
	for(i = 0; document.styleSheets.length > i; i++){
		if(document.styleSheets[i].rules != undefined){ //Mozilla
	   		for(j = 0; document.styleSheets[i].rules.length > j; j++){
	    		if(document.styleSheets[i].rules[j].selectorText.toLowerCase() == cssClassName){
	     			document.styleSheets[i].rules[j].style[toChange] = changeTo;
	    		}
	   		} 
	  	} 
		else if(document.styleSheets[i].cssRules != undefined){ //IE
	   		for(j = 0; document.styleSheets[i].cssRules.length > j; j++){
	    		if(document.styleSheets[i].cssRules[j].selectorText.toLowerCase() == cssClassName){
	     			document.styleSheets[i].cssRules[j].style[toChange] = changeTo;
	    		}
	   		}
	  	}
	 }
}
/* Dependencies: Relies on browser_sniff.js */
set_style_overrides(); //call itself on load
function set_style_overrides(){
	if(is_nav){
		StyleSheetChanger('#midpods div.pod-col1','width','183px');
		StyleSheetChanger('#midpods div.pod-col2','width','183px');
		StyleSheetChanger('#midpods div.pod-col3','width','183px');		
	}
}

load_images(); //call itself on load
function load_images(){
    if(document.images){
    	var names=new Array(18);
    	names[0]="top-1-on_img-b";
		names[1]="top-1-off_img-b";
		names[2]="top-1-current_img-b";
		names[3]="top-2-on_img-b";
		names[4]="top-2-off_img-b";
		names[5]="top-2-current_img-b";
		names[6]="top-3-on_img-b";
		names[7]="top-3-off_img-b";
		names[8]="top-3-current_img-b";
    	names[9]="bot-1-on_img-b";
		names[10]="bot-1-off_img-b";
		names[11]="bot-1-current_img-b";
		names[12]="bot-2-on_img-b";
		names[13]="bot-2-off_img-b";
		names[14]="bot-2-current_img-b";
		names[15]="bot-3-on_img-b";
		names[16]="bot-3-off_img-b";
		names[17]="bot-3-current_img-b";
		
        var imagePath="images/";
        var cellbg=new Array(18);
		
		cellbg[0]=new Image();
		cellbg[0].src = imagePath+"but1_on_b.gif";
		cellbg[1]=new Image();
		cellbg[1].src = imagePath+"but1_off_b.gif";
		cellbg[2]=new Image();
		cellbg[2].src = imagePath+"but1_on_b.gif";
		
		cellbg[3]=new Image();
		cellbg[3].src = imagePath+"but2_on_b.gif";
		cellbg[4]=new Image();
		cellbg[4].src = imagePath+"but2_off_b.gif";
		cellbg[5]=new Image();
		cellbg[5].src = imagePath+"but2_on_b.gif";

		cellbg[6]=new Image();
		cellbg[6].src = imagePath+"but3_on_b.gif";
		cellbg[7]=new Image();
		cellbg[7].src = imagePath+"but3_off_b.gif";
		cellbg[8]=new Image();
		cellbg[8].src = imagePath+"but3_on_b.gif";
		
		cellbg[9]=new Image();
		cellbg[9].src = imagePath+"but1_on_b.gif";
		cellbg[10]=new Image();
		cellbg[10].src = imagePath+"but1_off_b.gif";
		cellbg[11]=new Image();
		cellbg[11].src = imagePath+"but1_on_b.gif";
		
		cellbg[12]=new Image();
		cellbg[12].src = imagePath+"but2_on_b.gif";
		cellbg[13]=new Image();
		cellbg[13].src = imagePath+"but2_off_b.gif";
		cellbg[14]=new Image();
		cellbg[14].src = imagePath+"but2_on_b.gif";
		
		cellbg[15]=new Image();
		cellbg[15].src = imagePath+"but3_on_b.gif";
		cellbg[16]=new Image();
		cellbg[16].src = imagePath+"but3_off_b.gif";
		cellbg[17]=new Image();
		cellbg[17].src = imagePath+"but3_on_b.gif";
	}
}

function swap(curObject, mnuCnt){
	return;
	var curClass = curObject.className;
	var tokens = curClass.split('-');
	var position = tokens[0];
	var numLines = tokens[1];
	var state = tokens[2];
	
	var img_url = "images/but"+numLines+"_"; //"but3_"
	var cell = document.getElementById('img-b_'+mnuCnt);
	
	if(state != "current"){
		if(cell.src.indexOf("off_") > 0){
			img_url = img_url + "on_";
		}
		else{
			img_url = img_url + "off_";
		}
		img_url = img_url + "b.gif";
		
		cell.src=img_url;	
	}
}
