function doPostBack(Task,TaskId)
{
	document.forms[0].task.value  = Task;
	document.forms[0].taskid.value  = TaskId;
	document.forms[0].submit();
}

function doRA(sTask, sPageID, sFolderLevel)
{
	if(sFolderLevel=="1")
	{
		location.href = "../Login.aspx?from=course&task="+sTask+"&pageid="+sPageID;
	}
	else if(sFolderLevel=="2")
	{
		location.href = "../../Login.aspx?from=course&task="+sTask+"&pageid="+sPageID;
	}
	else
	{
		location.href = "Login.aspx?from=course&task="+sTask+"&pageid="+sPageID;
	}
}

function doLaunchAssessment(sAssestID)
{
				//var sURL = "http://hume.learningmate.com/bfw34/Player/Pages/launchCourse.aspx?Show=DirectExam&Tab_Number=1&Ace_Course_id=314523c9-b90c-42cb-bb39-f508ac3b87a2&Ace_Course_Instance_id=314523c9-b90c-42cb-bb39-f508ac3b87a2&LMS_Type=3&LI_UserID=007&LI_UserType=S&LI_First_Name=TestAdmin&LI_Last_Name=adminTest&LI_User_EmailID=test@student.edu&LI_InstructorEmailID=instructor@school.edu&Asmt_ID=";
				var sURL = "http://bcs.bedfordstmartins.com/bedhandbook7enew/Player/Pages/launchCourse.aspx?Show=DirectExam&Tab_Number=2&Ace_Course_id=c9489661-6bf8-4f5e-ac05-b07835d589c7&Ace_Course_Instance_id=29401042-22fa-4e97-9294-84f8c4da2442&LMS_Type=3&LI_UserID=007&LI_UserType=S&LI_First_Name=TestAdmin&LI_Last_Name=adminTest&LI_User_EmailID=test@student.edu&LI_InstructorEmailID=instructor@school.edu&Asmt_ID="
				sURL = "../SingleAssessmentLaunch.aspx?assessment_id="+sAssestID+"&browser="+browser;
				//window.open(sURL);
				doOpenPopWindow(sURL,"Pasadena_City_College",'700','450');
				//window.open(sURL,'Pasadena_City_College','menubar=no,width=700,height=450,left=50,top=50,scrollbars=no,resizable=no');
				//alert(sURL+sAssestID);///BFW34-Hacker%20Silver
}
			
function doOpenPopWindow(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=50,top=50,scrollbars=no,resizable=yes');
}

function doOpenPopWindowWithScroll(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=50,top=50,scrollbars=yes,resizable=yes');
}

function doOpenPopWindowWithScroll2(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=70,top=70,scrollbars=yes,resizable=yes');
}



 //////////////////////////////// Browser Detection Code ///////////////////////////////////////////////////

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}



function _onMouseMove(e){
	mmevt.x=e.clientX;
	mmevt.y=e.clientY;

}
var mmevt=new function(){
	this.x=0;
	this.y=0;
	this.y_click=0;
	this.x_click=0;
};

function swapLayers(id)
{
if (document.getElementById(id).style.visibility=="visible")
	document.getElementById(id).style.visibility="hidden";
else
	document.getElementById(id).style.visibility="visible";	
	document.getElementById(id).style.top= mmevt.y + document.body.scrollTop+20;
	document.getElementById(id).style.left= mmevt.x + document.body.scrollTop+20;
	
}
