var PageUrl = "http://www.cab.org.in";
	
	function OpenShareLinkPage(GUID, Link, UserStatus)
	{
	//alert(Link);

		if(UserStatus != 'True')
		{
			alert('Please login/register to share the link.');
		}
		else
		{	
			var SharePageUrl = PageUrl + '/Shared%20Documents/ShareLink.aspx';											
			if(window.showModalDialog)
			{
		    window.showModalDialog(SharePageUrl + '?Link=' + Link + '', null, 'toolbar:0;location:0;directories:0;menubar:0;status:no;dialogWidth:400px;dialogHeight:135px;dialogHide:true;help:no;scroll:no');
		    }
		    else
		    {
		     window.open(SharePageUrl + '?Link=' + Link + '','name','toolbar=0,directories=0,menubar=0,status=no,width=400px,height=135px,help=no,scroll=no,resizable=no,modal=yes');		     
		    // window.focus();
		    }
			//window.location.href = window.location.href;
			
		}
	}

	function OpenPostCommentPage(ItemID, GUID , UserStatus, ListID, Link)
	{
	//alert(Link);
		if(UserStatus != 'True')
		{
			alert('Please login/register to post your feedback.');
		}
		else
		{
			var FeedbackPageUrl = PageUrl + '/Shared%20Documents/PostFeedback.aspx';
			//alert(FeedbackPageUrl + '?ItemID=' + ItemID +'&ID='+ GUID +'&List=' + ListID+'');
			if(window.showModalDialog)
			{
			window.showModalDialog(FeedbackPageUrl + '?ItemID=' + ItemID +'&ID='+ GUID +'&List=' + ListID + '&PageURL=' + Link +'', null, 'toolbar:0;location:0;directories:0;menubar:0;status:no;dialogWidth:530px;dialogHeight:280px;dialogHide:true;help:no;scroll:no');
			}
			else
		    {
		    window.open(FeedbackPageUrl + '?ItemID=' + ItemID +'&ID='+ GUID +'&List=' + ListID + '&PageURL=' + Link +'','name','toolbar=0,location=0,directories=0,menubar=0,status=no,width=530px,height=280px,help=no,scroll=no,modal=yes');
		    
			}
			//alert(ItemID);
			//window.location.href = window.location.href;
		}
	}
	
	function OpenRatingPage(GUID, ItemID, ListID, UserStatus)
	{
		if(UserStatus != 'True')
		{
			alert('Please login/register to rate.');		
		}
		else
		{
			var RatePageUrl = PageUrl + '/Shared%20Documents/UserRating.aspx';
			//alert(PageUrl + '?ListID=' + ListID+ '&ItemID=' + ItemID +'');
			if(window.showModalDialog)
			{
				window.showModalDialog(RatePageUrl + '?List=' + ListID+ '&ItemID=' + ItemID +'&ID='+ GUID +'', null, 'toolbar:0;location:0;directories:0;menubar:0;status:no;dialogWidth:40px;dialogHeight:30px;dialogHide:true;help:no;scroll:no');
			}
			else
			{
			window.open(RatePageUrl + '?List=' + ListID+ '&ItemID=' + ItemID +'&ID='+ GUID +'', 'name', 'toolbar=0,location=0,directories=0,menubar=0,status=no,width=250px,height=60px,help=no,scroll=no,modal=yes');

			}
			//window.location.href = window.location.href;
		}
		
		//return false;
	}


/******************************************************************************************************
										Faculty Profile
*******************************************************************************************************/
var FacultyPage = "/OtherPages/ContactFaculty.aspx?";
function ContactFaculty(FacultyName, FacultyEmail) 
{
    //alert(FacultyPage + 'Email=' + FacultyEmail + '&Name=' + FacultyName);
    if(window.showModalDialog)
	{
	    window.showModalDialog(FacultyPage + 'Email=' + FacultyEmail + '&Name=' + FacultyName+'', null, 'toolbar:0;location:0;directories:0;menubar:0;status:no;dialogWidth:450px;dialogHeight:350px;dialogHide:true;help:no;scroll:no');
    }
    else
	{
		window.open(FacultyPage + 'Email=' + FacultyEmail + '&Name=' + FacultyName+'', 'name', 'toolbar=0,location=0,directories=0,menubar=0,status=no,width=450px,height=350px,help=no,scroll=no,modal=yes');

	}

    return false;
}

