

/* End of Navaigator Manager Class */
/**
 * @class SignInBubble_Class
 * This class is responsible for managing the Ajax signin module
 */

Core.SignInBubble_Class=function() {
    this.PopupPath = POPUPPATHSIGNIN;
    this.PopupHeight = POPUPSIGNINHIEGHT;
    this.PopupWidth = POPUPSIGNINWIDTH;
    this.TopicType = "";
    this.newWindow = "";
    this.ShowPopUp=false;

    /**
     * Shows the Sign in bubble from the Favorites 
     */    
    this.ShowBubbleFromFavoritesBubble=function(objCode){
        
        if (this.ShowPopUp==true) {
            if (this.newWindow && !this.newWindow.closed)	{
		        this.newWindow.close();
	        }	
    		
	        var winl = (screen.width - this.PopupWidth) / 2;
	        var wint = (screen.height - this.PopupHeight) / 2;
	        if (this.TopicType == ""){
	            this.newWindow = open(this.PopupPath + "?objCode=" + objCode, 'FavoritePopup', ("toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=" + wint + ",left=" + winl + ",width=" + this.PopupWidth + ",height=" + this.PopupHeight + "\""));
	        }else{
	            this.newWindow = open(this.PopupPath + "?objCode=" + objCode + "&TopicType=" + this.TopicType, 'FavoritePopup', ("toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=" + wint + ",left=" + winl + ",width=" + this.PopupWidth + ",height=" + this.PopupHeight + "\""));
	        }
	        this.newWindow.focus();
	    }
	    else {
	       alert("Please sign in");
	    }
	    
    }

    /**
     * Shows the Sign in bubble from the Favorites 
     */    
    this.ShowBubble=function(){    
        if (this.newWindow && !this.newWindow.closed)	{
		    this.newWindow.close();
	    }	
		
	    var winl = (screen.width - this.PopupWidth) / 2;
	    var wint = (screen.height - this.PopupHeight) / 2;
    
        this.newWindow = open(this.PopupPath, 'SigninPopup', ("toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=" + wint + ",left=" + winl + ",width=" + this.PopupWidth + ",height=" + this.PopupHeight + "\""));

	    this.newWindow.focus();    
    
    }
    
}
/**
* It registers the  SignInBubble_Class using registerClass method of MS AJAX Library
*/
if (IsTypeDefined) { Core.SignInBubble_Class.registerClass('Core.SignInBubble_Class'); }
 

