/*
function CallPrint() {
    try
    {
        var prtContent = document.getElementById('divprint');
        var WinPrint = window.open('', '', 'letf=0,top=0,width=0,height=0,toolbar=0,scrollbars=0,status=0');
        WinPrint.document.write(prtContent.innerHTML);
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print();
        WinPrint.close();
        //prtContent.innerHTML = strOldOne;

    }
    catch(ex)
    {}
}*/

function RedirectToCabCallingContent(URl)
	{
		//alert(URl);
		window.location.href=URl;
		return false;
	}

function Download(Pageurl) {
    //alert(Pageurl);
    window.open(Pageurl, '', 'letf=0,top=0,width=800,height=600,toolbar=0,scrollbars=0,status=0');
    return false;

}


function ShowSubscriptionMessage(PageUrl)
{
/*
var Result=confirm(" This latest issue is not available for download. In order to receive hard copy please subscribe by downloading the subscription form. \n Do you want to download subscription form ? \n If you prefer to select 'cancel', you will still be able to view some past issues.");

if(Result)
{
//alert(Result);
window.location.href=PageUrl;
}
else
{
//alert(Result);
window.location.href="/Lists/CAB%20Calling/AllItems.aspx";
}
return false;
*/
    window.open("http://www.cab.org.in/CABCallingLatest.htm", 'name', 'toolbar=0,letf=0,top=0,width=800,height=600,toolbar=0,scrollbars=0,status=0');
    return false;

}


/////////////////////////////////////////////////////////////
//			Main Flash
/////////////////////////////////////////////////////////////

// Handle all the FSCommand messages in a Flash movie.
function mainbanner_DoFSCommand(command, args) {
	var mainbannerObj = isInternetExplorer ? document.all.mainbanner : document.mainbanner;
	if (command == "CurrentLanguage") 
	{
		if("Hindi"==readCookie("SiteState"))
		{
	  		window.document.mainbanner.SetVariable("CurrentLanguage", "Hindi");
	  	}
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub mainbanner_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call mainbanner_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

/////////////////////////////////////////////////////////////
//			Calender
/////////////////////////////////////////////////////////////
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function calender_DoFSCommand(command, args) {
    var calenderObj = isInternetExplorer ? document.all.calender : document.calender;
    if (command == "callJavascript") {
        //alert(sendText);
        window.document.calender.SetVariable("testValue", sendText);
    }
    
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
    document.write('<script language=\"VBScript\"\>\n');
    document.write('On Error Resume Next\n');
    document.write('Sub calender_FSCommand(ByVal command, ByVal args)\n');
    document.write('	Call calender_DoFSCommand(command, args)\n');
    document.write('End Sub\n');
    document.write('</script\>\n');
}


/////////////////////////////////////////////////////////////
//			MediaPlayer
/////////////////////////////////////////////////////////////


// Handle all the FSCommand messages in a Flash movie.
function mediaplayer_DoFSCommand(command, args) {
	var mediaplayerObj = isInternetExplorer ? document.all.mediaplayer : document.mediaplayer;
	
 	if (command == "LoadVideoInfo") {
        //alert("hi");
        window.document.mediaplayer.SetVariable("VideoInfo", MediaText);
    }
    if(command=="LoadRelatedVideoInfo")
    {
    	//alert(args);
  		GetData(args);  	
    }
}

function OnServerError(arg)
{
   //alert("Error:"+arg);
} 

function OnServerResponse(arg, context)
{
	//alert(arg);
 	window.document.mediaplayer.SetVariable("RelatedVideo", arg);
} 

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub mediaplayer_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call mediaplayer_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->


/////////////////////////////////////////////////////////////
//			Upcomming Events
/////////////////////////////////////////////////////////////



// Handle all the FSCommand messages in a Flash movie.
function upcomingevents_DoFSCommand(command, args) {
	var upcomingeventsObj = isInternetExplorer ? document.all.upcomingevents : document.upcomingevents;
	if (command == "LoadEventInfo") {
        window.document.upcomingevents.SetVariable("EventInfo", upcomingText);
    }
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub upcomingevents_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call upcomingevents_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}