/*(c) 2001-2006 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";
  if(www){
   frm.action = "http://www.kineticbooks.com/forms/search.php";
   }
  else{
   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 feedbackOld(type){
	var base = "http://www.kineticbooks.com/support/feedback.php";
	var extras = 'scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes';
	var name = "fb";
	type += "&ver="+version+"&loc=cd&pid="+prodID;
	var html = base+"?product="+type;
	var nwin = window.open(html,name,extras);
	if (parseInt(navigator.appVersion) >= 4) { nwin.focus(); }
	}

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>");
		}
	}

