function DoQuestionToGrade(cdtaid)
{
	var param = "list=QTG|"+cdtaid;
	getResponseWithScript('myContent',param,'LoadingPanel','/modules/utils/content.aspx');		

}




function DoJobList(){
	var param = "list=O|Out";
	getResponseWithScript('JobContent',param,'LoadingPanel','/jo/Forms/JobSearch.aspx');	

}
function DoLogout(){

		var param = "list=O|Out";
		getResponseWithScript('myContent',param,'LoadingPanel','/modules/utils/content.aspx');	

}
function DoRedirect(){
	
	document.location.href='/webs/OSF/training.aspx';

}
function DoRedirect2(){
	
	document.location.href='/webs/OSF/default.aspx';

}
function DoRedirect3(){
	getResponseWithScript('myContent','list=C|560','LoadingPanel','/modules/utils/content.aspx');
		
	var strURL = "http://www.arda.org/AM/Template.cfm?Section=About_the_Foundation1";
	window.open(strURL, "NewDocWindow", "toolbar=1,location=1, menubar=1, scrollbars=1, resizable=1"); 	

}
function DoRedirect4(){
	
	alert("All data has been stored. Please activate your account from the link, provided in a confirmation email. Then use login box to login to your account. Thanks for your time."); 
	getResponseWithScript('myContent','list=C|116','LoadingPanel','content.aspx');
}



function OnClientItemClickingHandler(sender, e) {
    //alert(e.Item.Value);
	if(e.Item.Value!="0"){
		var param = 'list=D|'+e.Item.Value;
		getResponseWithScript('myContent',param,'LoadingPanel','/modules/utils/content.aspx');
		}
}


function DoSideBar(pId) {
    $("#sideBarDiv").html($("#LoadingPanel").html());
    $("#sideBarDiv").load("/webs/OSF/SideBar.aspx", { pageId: pId });
}



//---------LINKS HANDLER-----------//
function DoLinks(i)
{
	var param="list=C|"+i;
	getResponseWithScript('myContent',param,'LoadingPanel','/modules/utils/content.aspx');
}
function DoLinks2(i)
{
    $("#myContent").html($("#LoadingPanel").html());
    $("#myContent").load('trainingHome.aspx', { test: 0 });
}
//---------FORM HANDLER-----------//
function DoStep(i)
{
	switch (i)
	{
		case 1:
			alert("Following signup process is for Consumer Centric Selling Program only.");
			var param="list=0";
			getResponseWithScript('myContent',param,'LoadingPanel','forms/FormSignup1.aspx');		
			break;		
		case 2:
			var param="list=1";
			getResponseWithScript('myContent',param,'LoadingPanel','forms/FormSignup2.aspx');
			break;			
	}

}



//-----------ARDA LOGIN-------------//

function DoNavMenu(){
	var param = "list=C|"+GetPageId();
	getResponseWithScript('content',param,'LoadingPanel','/modules/utils/content.aspx')	
}	

function GetPageId(){


}
function DoLogin(){
    if (checkString3(document.getElementById("userNameTxt"), "USER NAME", false)
		&& checkString(document.getElementById("passwordTxt"), "PASSWORD", false))
	{
		var param = "list=L|"+GetLoginInfo();
		getResponseWithScript('myContent',param,'LoadingPanel','/modules/utils/content.aspx');	
	}


}
function GetLoginInfo(){
    var s = document.getElementById("userNameTxt").value + "|";
    s += document.getElementById("passwordTxt").value + "|";
	return s;
}

function SetLoginMsg(msg){
	
	var s = "SetMsg('"+msg+"');";
	window.setTimeout(s,100);
}
function SetMsg(msg){

    document.getElementById("myContent").innerHTML = msg;

}


function DoShowEvents() {
    $("#myContent").html($("#LoadingPanel").html());
    $("#myContent").load('eventCal.aspx', { test: 0 });
}

function ShowAllVideos(compId) {
    $("#myContent").html($("#LoadingPanel").html());
    $("#myContent").load("/WebFacingVideo/VideoList.aspx?companyId=" + compId, { test: 0 });
}

function loadwindow(url, width, height) {

    var oManager = GetRadWindowManager();

    var oWnd = oManager.GetWindowByName("PopUp");

    oWnd.SetSize(width, height);
    oWnd.SetUrl(url);

    oWnd.Show();
}

function DoShowVideo(fileName, companyId) {
    loadwindow("/WebFacingVideo/default.aspx?companyId=" + companyId + "&fileName=" + fileName, 665, 550);
}

function DoCloseWindow() {
    var oManager = GetRadWindowManager();

    var oWnd = oManager.GetWindowByName("PopUp");
    oWnd.SetUrl("http://microsoft.com/");
}

function DoShowVideoEscaped(fileName, companyId) {
    loadwindow("/WebFacingVideo/default.aspx?companyId=" + companyId + "&fileName=" + encodeURI(fileName), 665, 550);
}

function DoShowVideoUrl(url) {
    loadwindow("/WebFacingVideo/default.aspx?url=" + encodeURI(url), 665, 550);
}

function DoSideBarClick(pId) {
    getResponseWithScript('myContent', 'list=C|' + pId, 'LoadingPanel', '/modules/utils/content.aspx');
    DoSideBar(pId);
}
