/*(c) 2001-2007 Kinetic Books Company */
function nothing(){}
www = false;
TM = false;
loc = document.location.toString();
var stubsearchstr = "Please enter a search term";
function sFunc(depth){
	if(typeof(depth)=="undefined"){depth=2;}
	var backup = "";
	for (var i=0;i<depth;i++){backup += "../";}
 var frm = document.forms[document.forms.length-1];
 var sBox = frm.elements[0];
 if(sBox.value!="" && sBox.value != stubsearchstr ){
  frm.method = "get";
	frm.action= backup+"search/search.html";
  }
 else{
  sBox.value= stubsearchstr;
  frm.action = "javascript:nothing();";
  }
 }

function clearstr(obj){
	if(obj.value==stubsearchstr) obj.value="";
	}

function feedbackButtonOld(sec,ch){
	var type = "Textbook&ChId=" + ch;
	if (sec != "") {type += "&SecId=" + sec;}
	document.write('<input type="button" name="open" class="feedback" value="Issues?" onClick="feedback(\'' + type + '\');">');
	}

function writeProbsLink(chnm){
	if(typeof(chapters)!='undefined' && chapters[chnm][2]){
		relpath = (TM)?"../problems/TeacherManual":"../problems/StudentManual";
		loc = window.location+"";
		getChapterFolder = loc.split("/");
		document.write("<a href=\""+relpath+"/"+getChapterFolder[getChapterFolder.length-2]+"/index.htm\">");
		document.write("Problems");
		document.write("</a>");
		}
	}
