function ReloadFrame(sTask, sTaskID)
{
	//document.forms[0].task.value = sTask;
	//document.forms[0].taskid.value = sTaskID;
	//document.forms[0].submit();
	if (sTaskID!="0")
	parent.location.href = "MainFrame.aspx?task="+sTask+"&taskid="+sTaskID;
}

function ChangeStyle(id, obj)
{
	document.getElementById(id).innerHTML="<table width='100%' cellspacing='0' cellpadding='0'><tr><td><img src='images/spacer.gif' width='1' height='2'></td></tr><tr><td><img src='images/purplearrow.jpg'/></td></tr><tr><td><img src='images/spacer.gif' width='1' height='2'></td></tr></table>";
	//document.getElementById(id).innerHTML="<img src='images/purplearrow.jpg'/>";
	obj.className = "LeftLinkHover";
}

function RestoreStyle(id, obj)
{
	document.getElementById(id).innerHTML="&nbsp;";
	obj.className = "LeftLink";
}

function OpenWritingResource(sTask, sTaskID)
{
	if (sTaskID!="")
	window.open(sTaskID , "" ,"");
}

function doPostBack(sTask, sTaskID)
{
	document.forms[0].task.value = sTask;
	document.forms[0].taskid.value = sTaskID;
	document.forms[0].submit();
}

function doOpenPopWindow(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=10,top=100,scrollbars=no,resizable=no,status=no');
}

function doOpenPopWindowWithScroll(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=10,top=100,scrollbars=yes,resizable=yes,status=no');
}



function doOpenTutorial(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=0,top=0,scrollbars=yes,resizable=no,status=no');
}

	function doShowRolloverText(sID)
	{
		switch(sID)
		{
			case "EHandbook":
			
			document.getElementById("RolloverTextTD").innerHTML = "Targeted handbook help online";
			break;
			case "Tutorials":
			
			document.getElementById("RolloverTextTD").innerHTML = "Dynamic resources for improving your writing";
			break;
			case "TopTwenty":
			
			document.getElementById("RolloverTextTD").innerHTML = "Help with the most common student writing problems";
			break;
			case "ExerciseCentral":
			
			document.getElementById("RolloverTextTD").innerHTML = "Interactive exercises to accompany <I>The St. Martin's Handbook</I>";
			break;
			case "ExerciseWorking":
			
			document.getElementById("RolloverTextTD").innerHTML = "Practice finding and using sources in MLA, APA, <I>Chicago,</I> and CSE styles";
			break;
			case "WritingSources":
			
			document.getElementById("RolloverTextTD").innerHTML = "Research assignments and resources";
			break;
			case "DocSources":
			
			document.getElementById("RolloverTextTD").innerHTML = "Advice for citing sources using MLA, APA, <I>Chicago,</I> and CSE styles";
			break;
			case "StudentWriting":
			
			document.getElementById("RolloverTextTD").innerHTML = "Model student documents in MLA, APA, <I>Chicago,</I> and CSE styles";
			break;
			
			case "WorkingOnline":
			
			document.getElementById("RolloverTextTD").innerHTML = "Resources and advice for writing online";
			break;
			
			case "WritingResources":
			
			document.getElementById("RolloverTextTD").innerHTML = "Help with writing inventories, critical thinking, and writing about literature";
			break;
			
			case "AdditionalResources":
			
			document.getElementById("RolloverTextTD").innerHTML = "Info on stasis theory, the CLAST, and THEA";
			break;
			
			case "AvoidingPla":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Tutorial on developing responsible research and writing habits";
			break;
			case "EvaluatingOnline":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Tutorial on evaluating online sources";
			break;
			case "BedfordResearch":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Tutorials and research guides for writing across the disciplines";
			break;
			case "BedfordBiblio":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Generate an annotated bibliography in MLA, APA, <I>Chicago,</I> or CSE style";
			break;
			case "VisualAnlysis":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Visual exercises that help you \"read\" and work with images";
			break;
			case "TopLinks":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Annotated links exploring a variety of writing topics";
			break;
			case "ModelDoc":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Examples of properly formatted essays, letters, r&eacute;sum&eacute;s, and more";
			break;
			case "DesigningDoc":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Tips for document design with a word-processor";
			break;
			case "DesigningWeb":
			
			document.getElementById("RolloverTextTD2").innerHTML = "An overview of developing and creating Web sites";
			break;
			case "PresentationSlides":
			
			document.getElementById("RolloverTextTD2").innerHTML = "A guide to designing and preparing effective slides";
			break;
			case "MoreWriting":
			
			document.getElementById("RolloverTextTD2").innerHTML = "Additional resources for reading and writing from Bedford/St. Martin's";
			break;
		}
		
	}
	
	function doRestoreDefaultText()
	{
		
		document.getElementById("RolloverTextTD").innerHTML = "Resources to complement and extend the coverage of <i>The St. Martin's Handbook</i>";
	}
	function doRestoreDefaultText2()
	{
		
		document.getElementById("RolloverTextTD2").innerHTML = "General resources for reading and writing from Bedford/St. Martin's";
	}

function doUpdateOpener()
{
	location.href = "../default.asp";
}