var strTranscript

function changeAnswer(text){
//	if (text!="" && document.getElementById("answerDiv")){
		text = text.replace(/-br-/g,"<p>");
		text = text.replace(/&apos;/g,"'");
//		document.getElementById("answerDiv").innerHTML = text;
//	}
strTranscript = text;
//tempWindow = window.open("transcripts.html","transcript","height=300,width=500,toolbar=0,status=0,scrollbars=1");

//tempWindow.document.getElementById("transcriptDiv").innerHTML = text;
//tempWindow.focus();

	newwindow2=window.open('','transcript','height=300,width=500,toolbar=0,status=0,scrollbars=1');
	var tmp = newwindow2.document;
	tmp.write('<html><head><title>Settlement Road - Transcript</title>');
	tmp.write('<link rel="stylesheet" href="/new/includes/transcript.css">');
	tmp.write('</head><body>');
	tmp.write('<p>'+strTranscript+'</p>');
	tmp.write('</body></html>');
	tmp.close();

}

function moveHomeInfo(newHeight){
//	if(newHeight!="" && document.getElementById("ContentBox")){
//		document.getElementById("ContentBox").style.top = newHeight + "px";
//		temp = parseInt(newHeight)+350;
//		document.getElementById("scrollCell").style.height = (temp) + "px";
//	}
}

function showFlashUpdate(){
	if(document.getElementById("update")){
		document.getElementById("update").style.display = "inline";
	}
}

function changeStyles() {
//	document.getElementById("ContentBox").style.padding = "20px";
//	document.getElementById("ContentBox").style.paddingBottom = "0px";
//	document.getElementById("ContentBox").style.border = "1px solid #379641";
//	document.getElementById("ContentBox").style.backgroundColor = "#666666";
//	document.getElementById("ContentBox").style.marginLeft = "10px";
//	document.getElementById("ContentBox").style.width = "469px";
//	if (!document.all) {
//		document.getElementById("ContentBox").style.width = "429px";
//	};
	document.getElementById("ContentBox").style.display = "none";
	document.getElementById("cta").style.display = "none";
	document.getElementById("HomeTable").style.backgroundImage = "none";
	document.getElementById("HomeTable").style.backgroundColor = "#b0b0b0";
}

function trackClick(url){
	ajaxFunction(url);
}

function ajaxFunction(variables) {
	var xmlHttp;
	try {  // Firefox, Opera 8.0+, Safari 
		xmlHttp=new XMLHttpRequest();
	} catch (e) {  // Internet Explorer 
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			//document.myForm.time.value = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET","/flashTrack.asp"+variables,true);
	xmlHttp.send(null);
}

//function to change the questions for Jill
var lastObj;
function jillQuestion(num) {
	if(lastObj){
		lastObj.style.color = "#000000";
	} else {
		document.getElementById("jill-1").style.color = "#000000";
	}
	tempObj = "jill-"+num;
	changeJillVideo(num);
	document.getElementById(tempObj).style.color = "#ffffff";
	lastObj = document.getElementById(tempObj);
}
function changeJillVideo(num) {
	var xmlHttp;
	try {  // Firefox, Opera 8.0+, Safari 
		xmlHttp=new XMLHttpRequest();
	} catch (e) {  // Internet Explorer 
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			document.getElementById("flashVideo").innerHTML = xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET","/includes/jillVideo.asp?video="+num,true);
	xmlHttp.send(null);
}