// <!--  /////////////////////////////////////////////////////
//					EDITABLE SECTION BEGINS
//
var FIRST_PAGE_MESSAGE = "This is the first page.";
var LAST_PAGE_MESSAGE = "This is the last page.";
var expHrs = 24;
var exp = new Date();
exp.setTime(exp.getTime() + (expHrs*60*60*1000));
//
//					EDITABLE SECTION ENDS
///////////////////////////////////////////////////////////////

var cookieName = "realestate_v2";
var page = new Array();
var CURR_PAGE = 0;
window.defaultStatus = '';

function init()       { CURR_PAGE = 0; goPage(); }
function addPage(u,n) { page[page.length] = new Page(u,n); }
function Page(u,n)    { this.url = u; this.name = n; }
function goToPage(p)  { p--; CURR_PAGE = p; goPage(); }
function goPage () { window.parent.content.location.replace(page[CURR_PAGE].url); window.parent.footer.location.reload(); }
function goNext () { var l = page.length; if(CURR_PAGE < l - 1) { CURR_PAGE++; goPage(); } else { alert(LAST_PAGE_MESSAGE); } }
function goFirst() { if ( CURR_PAGE > 0 ) { CURR_PAGE = 0; goPage(); } else { alert(FIRST_PAGE_MESSAGE); } }
function goPrev () { if ( CURR_PAGE > 0 ) { CURR_PAGE--  ; goPage(); } else { alert(FIRST_PAGE_MESSAGE); } }
function goLast () { var l = page.length; if(CURR_PAGE < l - 1) { CURR_PAGE = l - 1; goPage(); } else { alert(LAST_PAGE_MESSAGE); } }

// browser / function detection. object init in settings.
function browserDetection () {
	this.system = navigator.platform;
	this.browserName = navigator.appName;
	this.isNS = navigator.appName.toLowerCase() == "netscape" ? true : false;
	this.isIE = navigator.appName.toLowerCase() == "microsoft internet explorer" ? true : false;
	this.isWin = this.system == "Win32" || this.system == "Win16" ? true : false;
	this.isMac = this.system == "PPC" || this.system == "68K" ? true : false;
	this.hasLayers = document.layers ? true : false;
	this.hasAll = document.all ? true : false;
	this.hasGetElement = document.getElementById ? true : false;
	this.hasFlash = navigator.plugins['Shockwave Flash'] ? true : false;
	this.hasDirector = navigator.plugins['Shockwave for Director'] ? true : false;
}



//-----------------------------------------------
//				WINDOW FUNCTIONS
//-----------------------------------------------
function openWindow(name, url, centered) {
	var properties = "";
	var outputStr = url.toLowerCase().indexOf("<body") == -1 ? false : url;
	if ( outputStr != false ) { url = ""; }
	switch (name) {
	 case "pdf": properties = "directories=0,location=0,menubar=0,status=0,toolbar=0,width=790, height=545,left=10,top=10,scrollbars,resizable";
	 break;
	 case "trainingRoom": properties = "directories=0,location=0,menubar=0,status=0,toolbar=0,width=800,height=600,left=10,top=10,scrollbars,resizable";
	 break;
	 case "actWin": properties = "directories=0,location=0,menubar=0,status=0,toolbar=0,width=717,height=313,left=20,top=190";
	 break;
	 case "dictionary": properties = "menubar=0,toolbar=0,location=0,status=1,directories=0,resizable,scrollbars,height=200,width=450,left=330,top=200";
	 break;
	 case "code": properties = "menubar=0,toolbar=0,location=0,status=1,directories=0,resizable,scrollbars,height=300,width=550,left=250,top=100";
	 break;
	 case "hintWin": properties = "height=180,width=450,menubar=0,toolbar=0,location=0,status=0,directories=0,resizable,scrollbars=0,left=350,top=200";
	 break;
	 case "openSite": properties = "directories=0,location=0,scrollbars,resizable,menubar=0,status=0,toolbar=0,width=530,height=500,left=20,top=20";
	 break;
	 case "openSite_extLnk": properties = "directories=0,location=1,scrollbars,resizable,menubar=1,status=1,toolbar=0,width=530,height=500,left=20,top=20";
	 break;
	 case "fbWin": properties = "scrollbars,resizable,width=650,height=425,left=30,top=50";
	 break;
	 case "buildWin": properties = "height=230,width=450,menubar=0,toolbar=0,location=0,status=0,directories=0,resizable,scrollbars,left=330,top=200";
	 break;
	 case "exampleWin": properties = "scrollbars,resizable,width=550,height=400,left=40,top=70";
	 break;
	 case "openSite": properties = "directories=0,location=0,scrollbars,resizable,menubar=0,status=0,toolbar=0,width=530,height=500,left=20,top=20";	
	 break;
	 case "pdfWin": properties = "scrollbars,resizable,menubar,width=500,height=500,left=50,top=30";
	 break;
	 case "houseView": properties = "scrollbars=0, resizable, directories=0,location=0,menubar=0,status=0,toolbar=0,width=510,height=430,left=20,top=20";
	 break;
	 case "openDoc": properties = "scrollbars,menubar,resizable,toolbar,width=540,height=300,left=60,top=60";
	 break;
	 case "exampleWin": properties = "scrollbars,resizable,width=550,height=400,left=40,top=70";
	 break;
	 case "ftlWin": properties = "scrollbars,resizable,width=540,height=520,left=20,top=20";
	 break;
	 case "newWin": properties = "scrollbars,resizable,width=560,height=460,left=30,top=50";
	 break;
	 case "newWideWin": properties = "scrollbars,resizable,width=650,height=400,left=30,top=50";
	 break;
	 case "newPop": properties = "scrollbars,resizable,width=560,height=425,left=60,top=80";
	 break;
	 case "newPop1": properties = "scrollbars,resizable,width=560,height=425,left=90,top=110";
	 break;
	 case "tipBox": properties = "top=50,left=80,width=500,height=200,scrollbars";
	 break;
	 case "showSample": properties = "top=50,left=80,screenX=50,screenY=80,width=380,height=360";
	 break;
	 case "abbd": properties = "scrollbars,resizable,width=640,height=425,left=90,top=110";
	 break;
	}
	if ( centered ) { // if the window is centered
		if(w == null) w = 600;
		if(h == null) h = 400;
		var s = "scrollbars,resizable,menubar"; 
		s += ",height=" + h + ",innerHeight=" + h;
		s += ",width=" + w + ",innerWidth=" + w;
		if(window.screen) {
			var aH = screen.availHeight;
			var aW = screen.availWidth;
			var cY = Math.round((aH - h)/2);
			var cX = Math.round((aW - w)/2);
			s += ",left=" + cX + ",screenX=" + cX;
			s += ",top=" + cY + ",screenY=" + cY;
		}
	}
	if (name == 'pdfWin'){
		window.open(url, '_blank')
	} else {
		var win = window.open(url, name, properties);
		if ( outputStr != false ) {
			win.document.write(outputStr);
			win.document.close();
		}
		win.focus();
	}
}
//Sets the opener window to the specified URL
function mainWin (url) { window.opener.parent.location.href = url; }
function loadTop (url) { window.location.replace(url); }

//This window is a generic popup with scrollbars. Used for a number of windows.
function newWin(url) { openWindow('newWin', url, false); }
function newWideWin(url) { openWindow('newWideWin', url, false); }
function newPop(url) { openWindow('newPop', url, false); }
function th_trainPop(url, properties) {
	var winName = "trainingPopUpWindow";
	if ( properties == void(0) ) { properties = "scrollbars,resizable,width=550,height=425,left=80,top=100"; }
	window.open(url, winName, properties);
	self.close();
}

//This is the dictionary popup window.
function openDictionary(wrd) { openWindow("dictionary", mySettings.pathOffset() + 'tools/dictnary.htm#'+wrd, false); }
function openFinDictionary(wrd) { openWindow("dictionary", mySettings.pathOffset() + 'training/business/fs/glossary.htm#'+wrd, false); }


//This is the code of conduct popup window.
function openCode(wrd) { openWindow("code", mySettings.pathOffset() + 'tools/recode.htm#'+wrd, false); }
function openCodeRLA(wrd) { openWindow("code", mySettings.pathOffset() + 'tools/rlacode.htm#'+wrd, false); }
function openCodeAU(wrd) { openWindow("code", mySettings.pathOffset() + 'tools/aucode.htm#'+wrd, false); }

//This window is popup for hints in puzzles section
function hintWin(url) { openWindow('hintWin', url, false); }
//This is the Building style dictionary popup window.
function buildWin(url) { openWindow('buildWin', url, false); }
//This window is a window with frames that needs to show feedbacks.
function fbWin(url) { openWindow('fbWin', url, false); }
//This window is used for the subsection popups from Training Manual pages.
function exampleWin(url) { openWindow('exampleWin', url, false); }
//This window is used for the follow the leader popups.
function ftlWin(url) { openWindow('ftlWin', url, false); }
//Popup used for PDFs
function pdfWin(url) { openWindow('pdfWin', url, false); }
//This popup is used for the REIBS and BSCC websites.
function openSite(url) { openWindow('openSite', url, false); }
//This popup is used for the houseviews and city map
function houseView(url) { openWindow('houseView', url, false); }
//Popup used for word documents
function openDoc(url) {	openWindow('openDoc', url, false); }

//Popup used for external websites
function openExternal(url) {
	var winName = "ExternalSite";
	var properties = "scrollbars,menubar,status,location,toolbar,resizable,width=600,height=400,left=60,top=60";
	window.open(url, winName, properties);
}

function goProgress() { openWin("progress.html"); }
function openWin(u, name) { var win = window.open(u, name ,f); }
function showPage(p) { openWin(p); }

function goBookCase() {
	if (bInfo.hasLayers) { // NETSCAPE 4
		f = "top=-10,left=10,screenX=50,screenY=80,width=640,height=485,scrollbars,resizable,status,location,menubar";
		openWin("../../../tools/bookcase/bookcase.html", "bookcase");
	} else { // MICROSOFT
		f = "top=0,left=10,screenX=50,screenY=80,width=640,height=485,scrollbars,resizable,status,location,menubar";
		openWin("../../../tools/bookcase/bookcase.html", "bookcase");
	}
}
function showClue(p) {
	f = "top=50,left=80,screenX=50,screenY=80,width=400,height=240,scrollbars,resizable";
	openWin(p);
}
function showSample(n) {
	var t = '<html><head><title></title>'
	+ '<link rel="stylesheet" href="../../../styles/styles.css">'
	+ '</head><body bgcolor="#ffffff" onBlur="self.close();">'
	+ '<div align="center">'
	+ '<img src="images/img' + n + '_big.jpg" width="360" height="300" border="0">'
	+ '<p><a href="javascript:self.close()">Close Window</a></p>'
	+ '</div></body></html>'
	openWindow("showSample", t, false);
}
function showHide(eID, action, container) {
 if (bInfo.hasLayers) { // Netscape Code
  if (action) { action = "show"; } else { action = "hide"; }
  eval("document."+container+".layers['" + eID + "'].visibility='" + action + "';"); // 
 } else {
  if (action) { action = "visible"; } else { action = "hidden"; }
  if (bInfo.isNS) { eval("document.getElementById('" + eID + "').style.visibility='" + action + "';"); // Netscape 6 Code
  } else { eval(eID + ".style.visibility='" + action + "';"); // Microsoft Code
  }
 }
}
function changeContent (lyrName, str){
 if ( bInfo.hasLayers ) { //thisbrowser="NN4";
  lyrID = document.layers[lyrName];
  lyrID.document.open();
  lyrID.document.write(str);
  lyrID.document.close();
 } else if (!bInfo.hasAll && bInfo.hasGetElement){ //thisbrowser="NN6";
  lyrID = document.getElementById(lyrName);
  lyrID.innerHTML =str;
 } else if (bInfo.hasAll){ //thisbrowser="ie"
  lyrID = document.all[lyrName];
  lyrID.innerHTML=str;
 }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// NS fix
function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
 document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
} 
//top menu icons, image mouseover and text display
function iconChange(primary, imgname1, secondary, imgname2) {
	eval("document." + primary + ".src = '" + imgname1 + "'");
	eval("document." + secondary + ".src = '" + imgname2 + "'");	
}
// generic cookie stuff
function getCookieVal (offset) {  
 var endstr = document.cookie.indexOf (";", offset); 
 if (endstr == -1) { endstr = document.cookie.length; }
 return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {  
 var arg = name + "=";  
 var alen = arg.length;  
 var clen = document.cookie.length;  
 var i = 0;  
 while (i < clen) {    
 var j = i + alen;    
  if (document.cookie.substring(i, j) == arg)      
  return getCookieVal (j);    
  i = document.cookie.indexOf(" ", i) + 1;    
  if (i == 0) { break; }   
 }  
 return false;
}
function SetCookie (name, value) {
 var argv = SetCookie.arguments;  
 var argc = SetCookie.arguments.length;  
 var expires = (argc > 2) ? argv[2] : null;  
 var path = (argc > 3) ? argv[3] : null;  
 var domain = (argc > 4) ? argv[4] : null;  
 var secure = (argc > 5) ? argv[5] : false;  
 document.cookie = name + "=" + escape (value) + 
 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
 ((path == null) ? "" : ("; path=" + path)) +  
 ((domain == null) ? "" : ("; domain=" + domain)) +    
 ((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
 var exp = new Date();  
 exp.setTime (exp.getTime() - 1);  
 var cval = GetCookie (name);  
 document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
function getStrVars(Str) {
 if ( isString(Str) ) {
  vars = new Array();
  var firstpos=0, lastpos=Str.length, Namer=Str.substring(firstpos,lastpos);
  Namer = unescape(Namer.replace(/\s/g,"")); var tempArray = Namer.split("&");
  for ( var i = 0; i < tempArray.length; ++i) {
   var a = tempArray[i];
   tempArray1 = a.split("="); vars[tempArray1[0]] = tempArray1[1];
  }
  return vars;
 }
}
function setVarStr (array) { // convert an array into an escaped string.
 if ( isArray(array) ) {
  var str = ""; for (key in array) { str += key + "=" + array[key] + "&"; }
  str = str.substr(0, str.length-1); return escape(str);
 }
}
function isArray() {
 if (typeof arguments[0] == 'object') {
  var criterion = arguments[0].constructor.toString().match(/array/i);
   return (criterion != null);
  }
 return false;
} 
function isString() {
if (typeof arguments[0] == 'string') return true;
if (typeof arguments[0] == 'object') {
  var criterion = 
    arguments[0].constructor.toString().match(/string/i);
   return (criterion != null);
  }
return false;
}
function popUpObj () { // this creates a pop up object ..................................................<<
 // attributes
 this.name = 'tip_box';
 this.title = 'Tip Box';
 this.section = arguments[0];
 this.content = isString(arguments[1]) ? arguments[1] : '';
 this.fontColour = '#ffffff';
 this.linkColour = '#ffffff';
 this.typeFace = 'Arial, sans-serif';

 // methods
 this.colour = getTipColour;
 this.display = createTipBox;
 this.css = cssTipMarkup;
 this.printTip = set_printTip;
 this.displayAlt = tipboxalt;
}
function getTipColour() {
 var str = '';
 switch (this.section) {
  case "sales"   : str = '#3366FF'; break;
  case "property": str = '#B60000'; break;
  case "aservice": str = '#7F31D6'; break;
  case "business": str = '#CC9900'; break;
 }
 return str;
}
function cssTipMarkup () {
 var str = '', fontFamily = 'font-family: '+this.typeFace+';';
 var linkFaceColorWeight = ''+fontFamily+' font-size:100%; font-weight:bold; color:'+this.linkColour+';';
 with (this) {
  str += '\n<style type="text/css">\n<!--\n'
  + 'h1 { '+fontFamily+' font-size: 110%; font-style: normal; font-weight: bold; color:'+fontColour+'; }\n'
  + 'body { '+fontFamily+' color:'+fontColour+'; }\n'
  + 'p { '+fontFamily+' font-size: 90%}\n'
  + 'a:link { '+linkFaceColorWeight+' text-decoration:underline; }\n'
  + 'a:active { '+linkFaceColorWeight+' text-decoration:underline; }\n'
  + 'a:visited { '+linkFaceColorWeight+' text-decoration:underline; }\n'
  + 'a:hover { '+linkFaceColorWeight+' text-decoration:none; }\n'
  + 'ul, ol, li { '+fontFamily+' color:'+fontColour+'; font-size:11px; padding:0px; }\n-->\n</style>\n';
  }
 return str;
}
function createTipBox() {
 var g = '';
 with (this) {
  g += '<html><head><title>'+title+'</title>\n' + css();
  g += '<body bgcolor="#FFFFFF" text="#FFFFFF" leftmargin="0" topmargin="5" marginwidth="0" marginheight="5">\n'
    + '<table cellpadding="0" cellspacing="0" border="0" width="460" align="center"><tr><td colspan="3"><img src="'+mySettings.pathOffset()+'images/tips/'+section+'/tip_t.gif" width="460" height="18"></td></tr><tr><td bgcolor="'+colour()+'" width="5">&nbsp;</td><td valign="top" bgcolor="'+colour()+'">' + '<h1><img src="'+mySettings.pathOffset()+'images/tips/'+section+'/tip_ppl.gif" alt="Picture" align="right" vspace="5" hspace="5" />Tips</h1>\n' + content
	+ '</td><td bgcolor="'+colour()+'" width="5">&nbsp;</td></tr><tr><td colspan="3"><img src="'+mySettings.pathOffset()+'images/tips/'+section+'/tip_b.gif" width="460" height="28" usemap="#Map" border="0"></td></tr>'
	+ '<tr><td></td><td><img src="'+mySettings.pathOffset()+'images/spacer.gif" width="450" height="1" /></td><td></td></tr>\n'
	+ '</table>\n'
    + '<map name="Map"><area shape="rect" coords="400,6,450,22" href="#" onclick="window.close();" alt="Click here to close the window." title="Click here to close the window."></map>\n</body></html>';
 }
 openWindow("tipBox", g, false);
}
function tipboxalt() {
	var str;
	switch (arguments[0]) {
		case 'tipr': str = "Click here to read Rick\'s tip."; break;
		case 'tipe': str = "Click here to read Elaine\'s tip."; break;
		case 'tipc': str = "Click here to read Cliff\'s tip."; break;
		case 'tipm': str = "Click here to read Micheal\'s tip."; break;
		case 'tipg': str = "Click here to read Gail\'s tip."; break;
		case 'grape': str = "Click here to hear what\'s happening on the grapevine."; break;
	}
	return str;
}
function set_printTip () {
 var type = arguments[0];
 if ( type == 'grape' ) { w =50; h=73; } else { w=57; h=106;}
 document.write("<img src=\""+mySettings.pathOffset()+"images/tips/"+this.section+"/"+type+".gif\" ");
 document.write("width=\""+w+"\" height=\""+h+"\" border=\"0\" alt=\""+this.displayAlt(type)+"\" />");
} // end of Object  .....................................................................................<<

function settings () {// ..............................................................    settings Object
this.pathOffset = set_getPathOffset;
 this.MenuText = false;
 
 this.printStyleSheetLink = set_cssLink;
 this.printButtons = set_printCloseTopButtons;
 this.urlVars = set_loadVars;
 bInfo = new browserDetection();
}
function set_getPathOffset () {
 var splitChar; // make sure that we are testing for the first image!
 // var regx = new RegExp("(brfcase|bscc|comm|diary|map|office|orient|reibs|tips|tools|training).*", "gi");
 var regx = new RegExp("\/((?:brfcase|bscc|comm|diary|map|office|orient|reibs|tips|tools|training)\/.*)", "gi");
 var output = regx.exec(document.URL); var str = '';
 if ( output[1].indexOf("\/") != -1 ) { splitChar = "\/"; } else { splitChar = "\\"; }
 var a = output[1].split(splitChar); for (var i = 0; i < a.length-1; ++i) { str += '../'; }
 return str;


}
function set_cssLink () {
 var fileName = arguments[0], str = "", returnStr = arguments[1];
 if ( isString(fileName) && fileName.match(/[A-Za-z0-9_]*/i) ) {
 
  str += "<link rel=\"stylesheet\" href=\""+this.pathOffset() +"styles/"+fileName+".css\" type=\"text/css\" />\n";
  if ( returnStr ) { return str; } else { document.writeln(str); }
 }
}
function set_printCloseTopButtons () {
 for (var i = 0; i < arguments.length; i++ ) {
  switch (arguments[i]) {
  case "print":
   if ( !bInfo.isMac ) {
   	document.writeln("<a href=\"javascript:;\" onClick=\"window.print();\"><img ");
   	document.writeln("src=\""+this.pathOffset()+"images/nav/print.gif\" width=\"48\" height=\"16\" ");
   	document.writeln("border=\"0\" alt=\"Print button - Click here to print this page.\" /></a>");
   }
   break;
  case "top":
   document.writeln("<a href=\"#\" onClick=\"self.scrollTo(0, 0);\"><img ");
   document.writeln("src=\""+this.pathOffset()+"images/nav/top.gif\" width=\"42\" height=\"16\" ");
   document.writeln("border=\"0\" alt=\"Top button - Click here to go to the top of the page.\" /></a>");
   break;
  case "training":
   document.writeln("<a href=\""+this.pathOffset()+"training/content.htm?act="+parent.act+"&secid="+parent.ID+"&tasknum="+parent.tasknum+"\" target=\"_top\"><img ");
   document.writeln("src=\"../images/_train.gif\" width=\"54\" height=\"75\" ");
   document.writeln("border=\"0\" alt=\"Click here to go to the Training Manual.\" /></a>");
   break;
  case "close":
   document.writeln("<a href=\"#\" onClick=\"window.top.close();\"><img ");
   document.writeln("src=\""+this.pathOffset()+"images/nav/close.gif\" width=\"48\" height=\"16\" ");
   document.writeln("border=\"0\" alt=\"Close button - Click here to close the window.\" /></a>");
  }
  
 }
}
function set_loadVars () {
 var str = location.href;
 var idx = str.lastIndexOf('?');
 if ( idx != -1 ) { str = str.substr(idx+1);  return getStrVars(str.toLowerCase()); } else { // DEBUG:) alert(str);
  str = arguments[0]; return getStrVars(str);
 }
} // end of Object  .....................................................................................<<

function getFlashMovie ( x, y, name, url, vars, scale, objalign, swfalign ) {
	// alignment internal & external / scale / menu / 
	if ( bInfo.isWin && bInfo.isIE ) {
		var str = '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ';
		str += 'codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" ';
		str += 'width=\"'+x+'\" height=\"'+y+'\" id=\"'+name+'\">\n';
		str += '<param name=\"movie\" value=\"'+url+'\" /><param name=\"quality\" value=\"best\" />';
		str += '<param name=\"swliveconnect\" value=\"true\" /><param name=\"menu\" value=\"false\" />';
		str += '<param name=\"scale\" value=\"'+scale+'\" /><param name=\"salign\" value=\"'+swfalign+'\" />';
		str += '<param name=\"align\" value=\"'+objalign+'\" /><param name=\"flashvars\" value=\"'+vars+'\" />';
		str += '\n</object>';
	} else if ( bInfo.hasFlash || binfo.isMac ) {
		var str = '<embed name=\"'+name+'\" swLiveConnect=\"true\" src=\"'+url+'\" menu=\"false\" ';
		str += 'width=\"'+x+'\" height=\"'+y+'\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ';
		str +='scale=\"'+scale+'\" align=\"'+objalign+'\" salign=\"'+swfalign+'\" flashvars=\"'+vars+'\" ';
		str += 'type=\"application/x-shockwave-flash\" quality=\"best\"></embed>';
	} else { str = "<div><p>You are not using a browser compatible with this media.</p></div>"; }
	return str;
}
function getPageNosLinks() {
 var l = parent.page.length, t = "";
 for(var p = 0 ; p < l ; p++) {
  if(p != parent.CURR_PAGE) {
   t += '<a title="Go to page '+(p+1)+'" class="pagenumbers" href="javascript:parent.goToPage('+(p+1)+')">'+(p+1)+'</a>';
  } else { t += '<b class="activepage">'+(p+1)+'</b>' }
  if(p < l - 1) { t += ' - ' } }
 return '<div class="txt"> &nbsp;' + t + '</div>';
}
// this is for the next / back buttons at the bottom of the screen.
function displayImageButton (name, img, imgV, str, strV, w, h, funk) {
 MM_preloadImages(img, imgV);
 var t  = "<a title=\""+strV+"\" href=\""+funk+"\" onMouseOut=\"MM_swapImgRestore(); window.status='"+str+"';\" ";
 t += "onMouseOver=\"MM_swapImage('"+name+"','','"+imgV+"',1); window.status='"+strV+"'; return true;\">";
 t += "<img name=\""+name+"\" alt=\""+strV+"\" border=\"0\" src=\""+img+"\" width=\""+w+"\" height=\""+h+"\" /></a>";
 return t;
}
// displays next / back buttons if they are needed.
function getNextBack(where) { 
 var t = "", imgPath = "../images/", mod = "", wNext = 70;
 if ( where == "orient" ) { mod = ""; wNext = 54; } else { mod = "g"; }
 if(page.length > 1) {
  if(CURR_PAGE == 0) { t += "<img src=\"" + imgPath + "/spacer.gif\" width=\"54\" height=\"19\" alt=\"\" border=\"0\" />";
  } else if (CURR_PAGE > 0) { t += displayImageButton("prevBut", imgPath + "/nav/back"+mod+".gif", imgPath + "nav/back"+mod+"o.gif", "", "Back", 54, 19, "javascript:parent.goPrev();"); }
  if (CURR_PAGE == page.length-1) { t += "<img src=\"" + imgPath + "/spacer.gif\" width=\""+wNext+"\" height=\"19\" alt=\"\" border=\"0\" />";
  } else { t += displayImageButton("nextBut", imgPath + "/nav/next"+mod+".gif", imgPath + "nav/next"+mod+"o.gif", "", "Next", wNext, 19, "javascript:parent.goNext();"); }
 } else { t += "<img src=\"" + imgPath + "/spacer.gif\" width=\""+(wNext+54)+"\" height=\"19\" alt=\"\" border=\"0\" />"; }
 return "<div class=\"txt\">" + t + "</div>"
}
// this prints the step buttons on the right of the content page.
function getStepMenu () {
 var str = "", vars = "", imgPath = "../../images/";
 for (var i = 1; i <= totalsteps; ++i ) { MM_preloadImages(imgPath+i+"hi.gif");
  if ( i == step ) {
   str += "<img border=\"0\" src=\""+imgPath+i+"hi.gif\" width=\"27\" height=\"27\" hspace=\"4\" vspace=\"4\" alt=\"Step "+i+": "+pageTitles[ID][act][i]+"\" />";
  } else {
   vars = "act="+act+"&secid="+ID+"&step="+i+"&tasknum="+tasknum;
   str += "<a href=\"../../../content.htm?"+vars+"\" onMouseOut=\"MM_swapImgRestore()\"";
   str += " onMouseOver=\"MM_swapImage('stepBtn_"+i+"','','"+imgPath+i+"hi.gif',1)\" target=\"_parent\">";
   str += "<img name=\"stepBtn_"+i+"\" border=\"0\" src=\""+imgPath+i+".gif\" width=\"27\" height=\"27\"";
   str += " hspace=\"4\" vspace=\"4\" alt=\"Step "+i+": "+pageTitles[ID][act][i]+"\" /></a>";
  }
  str += "<br />\n";
 }
 return "\n<p>"+str+"</p>\n";
}

// this prints the next section button in the bottom nav of the content page.
function getNextStep () {
 var str1 = "", vars1 = "", imgPath1 = "../images/nav/";
 for (var i = 1; i <= totalsteps; ++i ) { 
 	MM_preloadImages(imgPath1+"nextsecto.gif");
	if (i!=totalsteps){
  		if ( i == step ) {
   			vars1 = "act="+act+"&secid="+ID+"&step="+(i+1)+"&tasknum="+tasknum;
   			str1 += "<a href=\"content.htm?"+vars+"\" onMouseOut=\"MM_swapImgRestore()\"";
   			str1 += " onMouseOver=\"MM_swapImage('stepBtn_"+(i+1)+"','','"+imgPath1+"nextsecto.gif',1)\" target=\"_parent\">";
   			str1 += "<img name=\"stepBtn_"+(i+1)+"\" border=\"0\" src=\""+imgPath1+"nextsect.gif\" width=\"99\" height=\"19\"";
   			str1 += " alt=\"Go to next section\" /></a>";
 			}
 		}
 	}
 return "\n"+str+"\n";
}
// display step title on content page.
function displayStepTitle () { return "<p class=\"firstpara\">Step "+step+": "+pageTitles[ID][act][step]+"</p>"; }

// end javascript file -->