// Global Variable Declarations
ns4 = (document.layers)? true:false; // netscape 4?
ie4 = (document.all)? true:false; // internet explorer 4/5?
ns6 = (ns4|ie4)? false:true; // (Netscape 6)

var isLoaded=false;

var screen_top=(screen.height/2)-(500/2);
var screen_left=(screen.width/2)-(300/2);

var pageHeight;
var pageWidth;
var js_isGreyBoxOn=false;

// Vars for IE tweaking of large flash items clashing with share/signup activity
var js_isTopContentInMotion=false;
var js_showFlashOnNextTopContentPass=false;

// Image Functions

function image_swap(in_name,in_state) {
	if (!isLoaded) {
		return true;
	}
	document.images[in_name].src = eval(in_name + "_" + in_state + ".src");
}

function nav_image_swap(in_name,in_state) {
	if (!isLoaded) {
		return true;
	}
	
	if (in_name!="nav_signup" && in_name!="nav_share") 
	{
    	document.images[in_name].src = eval(in_name + "_" + in_state + ".src");
    }    	
	
	if (in_name=="nav_signup") 
	{
	    if (!js_issignup_on)
	    {
	        if (in_state=="roll")
	        {
        	    if (!js_isshare_on)
        	    {
        	        document.images['nav_signup'].src = eval("nav_signup_roll.src");
        	        document.images['nav_share'].src = eval("nav_share_signup_roll.src");
        	        document.images['nav_right'].src = eval("nav_right_on.src");
                }
                else 
                {
        	        document.images['nav_signup'].src = eval("nav_signup_roll_share_on.src");
                }

                // Roll all navs to red state
                if (!js_isshare_on)
                {                
                    setAllRedNavStates("roll");
                }
	        }
	        if (in_state=="off")
	        {
        	    if (!js_isshare_on)
        	    {
        	        document.images['nav_signup'].src = eval("nav_signup_off.src");
        	        document.images['nav_share'].src = eval("nav_share_signup_off.src");
        	        document.images['nav_right'].src = eval("nav_right_off.src");
                }        	        
                else 
                {
        	        document.images['nav_signup'].src = eval("nav_signup_share_on.src");
                }

                // Return all navs to default state                
                if (!js_isshare_on)
                {                
                    setAllRedNavStates("off");
                }
	        }
        }
	}
	if (in_name=="nav_share") 
	{
	    if (!js_isshare_on)
	    {
            if (in_state=="roll")
            {
                if (!js_issignup_on)
                {
                    document.images['nav_share'].src = eval("nav_share_roll.src");
                }
                else
                {
                    document.images['nav_share'].src = eval("nav_share_roll_signup_on.src");
                }
            }
            if (in_state=="off")
            {
                if (!js_issignup_on)
                {
                    document.images['nav_share'].src = eval("nav_share_off.src");
                }
                else
                {
                    document.images['nav_share'].src = eval("nav_share_signup_on.src");
                }
            }
        }
	}
}

function setAllRedNavStates(in_state)
{
    var navNode=document.getElementById("GlobalNavList");
    var navLinks = navNode.getElementsByTagName("a");
    var navLinksLen = navLinks.length;
    for (i=0; i<navLinksLen; i++)
    {
        if (navLinks[i].className!="" && navLinks[i].className!=null)
        {
            if (in_state=="roll")
            {
                navLinks[i].className=navLinks[i].className + "Red";
                image_swap('nav_left','red');
                image_swap('nav_tabs','red');
            }
            else
            {
                navLinks[i].className=navLinks[i].className.replace("Red","");
                image_swap('nav_left','off');
                image_swap('nav_tabs','off');
            }
        }
    }
}

// Popups

// Specific functions
function setPopupPosition(in_height,in_width) {
	screen_top=(screen.height/2)-(in_height/2);
	screen_left=(screen.width/2)-(in_width/2);
	if (screen_top<0) {
		screen_top=0;
	}
	if (screen_left<0) {
		screen_left=0;
	}
}

// Window openers
function openContact() {
	contact_width=427;
	contact_height=550;
	popupWin = window.open(js_root + 'home/contact.aspx','contact','width=' + contact_width + ',height=' + contact_height + ',scrollbars=yes,resize=no');
}

function openCollectRules(market) {
	rules_width=417;
	rules_height=550;
	popupWin = window.open(js_root + 'rules/collect_rules.aspx?market=' + market,'collectRules','width=' + rules_width + ',height=' + rules_height + ',scrollbars=yes,resize=no');
}

// Form Functions
function submitFormInContext(in_context)
{
    document.forms[0].elements["FormContext"].value=in_context;
    document.forms[0].submit();
}

// Not used
function resetForm(in_context) 
{
    switch (in_context)
    {
        case "share":
            document.forms[0].GlobalShare_ShareYourEmail.value="Your Email";
            document.forms[0].GlobalShare_ShareYourName.value="Your Name";
            document.forms[0].GlobalShare_ShareFriendEmail.value="Friend's Email";
            break;
    }
}

// Top Menu DHTMLs
function toggleTopContent(in_context)
{
    if (in_context=='signup') 
    {
        if (js_isshare_on) 
        {
            // Flag to determine that we'll have activity in the top content
            // while sections are swapped
            js_isTopContentInMotion=true;
            
            // Hide Share
            ToggleIndividualTopContent("share");

            // Flag to tell us that we should trigger the Flash Content show on the next toggle
            js_showFlashOnNextTopContentPass=true;

            // Show signup
            myTimeout=setTimeout("ToggleIndividualTopContent('signup')",500);
        }
        else 
        {
            ToggleIndividualTopContent("signup");
        }
    }
    if (in_context=='share') 
    {
        if (js_issignup_on) 
        {
            // Flag to determine that we'll have activity in the top content
            // while sections are swapped
            js_isTopContentInMotion=true;
            
            // Hide signup
            ToggleIndividualTopContent("signup");
            
            // Flag to tell us that we should trigger the Flash Content show on the next toggle
            js_showFlashOnNextTopContentPass=true;
            
            // Show share
            myTimeout=setTimeout("ToggleIndividualTopContent('share')",500);
        }
        else 
        {
            ToggleIndividualTopContent("share");
        }
    }
}

function ToggleIndividualTopContent(in_context)
{
    // Turn off styles
    setAllRedNavStates("off");
    
    // Set TimeoutShow for Large Flash Items
    var timeoutDuration=650;
    
    // Reset the 'top in motion' flag
    if (js_showFlashOnNextTopContentPass)
    {
        js_isTopContentInMotion=false;
        js_showFlashOnNextTopContentPass=false;
    }
    
    // If this is the home page, hide the Flash
    if (js_context=="home" && js_hideLargeFlashOnTopTrigger)
    {
        try
        {
            $("#GlobalFloatingFlash").hide();
        }
        catch(err)
        {
        }
    }
    
    if (in_context=="signup")
    {
        if (js_issignup_on) 
        {
            // Hide signup and inforrm application that signup is off
   		    $('#SignupContentContainer').hide();
            $('#SignupContainer').slideUp();
            js_issignup_on=false;
            image_swap("nav_signup","off");
            image_swap("nav_share","off");
            image_swap("nav_right","off");
   		    window.frames['SessionManager'].location = "session_manager.aspx?context=Signup&value=false";
            window.frames['SessionManager'].focus();
        }
        else 
        {
            // Hide signup and inforrm application that signup is off, then show share and inform application that share is on
            myTimeout=setTimeout("$('#SignupContentContainer').show();",500);
            $('#SignupContainer').slideDown();
            js_issignup_on=true;
            image_swap("nav_signup","on");
            image_swap("nav_share","signup_on");
            image_swap("nav_right","on");
   		    window.frames['SessionManager'].location = "session_manager.aspx?context=Signup&value=true";
            window.frames['SessionManager'].focus();
            
            // Turn on Navs
            setAllRedNavStates('roll');
        }
    }
    else 
    {
        if (js_isshare_on) 
        {
            // Hide share and inforrm application that share is off
   		    $('#ShareContentContainer').hide();
            $('#ShareContainer').slideUp();
            js_isshare_on=false;
            image_swap("nav_share","off");
            image_swap("nav_right","off");
            image_swap("nav_signup","off");
   		    window.frames['SessionManager'].location = "session_manager.aspx?context=Share&value=false";
            window.frames['SessionManager'].focus();
        }
        else 
        {
            // Hide share and inforrm application that share is off, then show signup and inform application that signup is on
            myTimeout=setTimeout("$('#ShareContentContainer').show();",500);
            $('#ShareContainer').slideDown();
            js_isshare_on=true;
            image_swap("nav_share","on");
            image_swap("nav_right","on");
            image_swap("nav_signup","share_on");
   		    window.frames['SessionManager'].location = "session_manager.aspx?context=Share&value=true";
            window.frames['SessionManager'].focus();

            // Turn on Navs
            setAllRedNavStates('roll');
       }
    }
    
    // If this is the home page, show the Flash
    if (js_context=="home" && js_hideLargeFlashOnTopTrigger && !js_isTopContentInMotion)
    {
        myFlashTimeout=setTimeout("$('#GlobalFloatingFlash').show();",timeoutDuration);
    }
}

// Blurs and Focuses
function blurTextBox(element_name, default_value) {
	if (document.forms[0].elements[element_name].value=="") {
		document.forms[0].elements[element_name].value=default_value;
	}
}

function focusTextBox(element_name, default_value) {
	if (document.forms[0].elements[element_name].value==default_value) {
		document.forms[0].elements[element_name].value="";
	}
}

// Gray Out DHTML
function grayAndDisplay(top,left)
{
    if (!isLoaded)
    {
        return false;
    }
    var tnode = document.getElementById("FloatingModalContent");
    if (js_isshare_on || js_issignup_on) 
    {
        var new_top=top+70;
        if (js_isiepc) 
        {
            tnode.style.marginTop=new_top + 'px';                           
            tnode.style.marginLeft=left + 'px';    
        }
        else
        {
            tnode.style.top=new_top + 'px';                           
            tnode.style.left=left + 'px';    
        }
    }
    else
    {
        if (js_isiepc) 
        {
            tnode.style.marginTop=top + 'px';                           
            tnode.style.marginLeft=left + 'px';    
        }
        else
        {
            tnode.style.top=top + 'px';                           
            tnode.style.left=left + 'px';    
        }
    }
    grayOut(true, {'bgcolor':'#000000','opacity':'75', 'zindex':'50'})
    $('#FloatingModalContent').fadeIn();
    js_isGreyBoxOn=true;
}

function hideGray()
{
    if(js_doesPageHaveFlashAndGrey && js_hideFlashOnGrey)
    {
        // Right now the only instance where we have to rediplay Flash
        // is on the gallery page, so let's do that.  Later, we can extend
        //myTimeout=setTimeout('$("#GalleryPluginFlashWrapper").show()',500);
	    $("#GalleryPluginContent").show();
    }
    $('#FloatingModalContent').fadeOut();
    grayOut(false);
    js_isGreyBoxOn=false;
}

function grayOut(vis, options) {
  // Pass true to gray out screen, false to ungray
  // options are optional.  This is a JSON object with the following (optional) properties
  // opacity:0-100         // Lower number = less grayout higher = more of a blackout 
  // zindex: #             // HTML elements with a higher zindex appear on top of the gray out
  // bgcolor: (#xxxxxx)    // Standard RGB Hex color code
  // grayOut(true, {'zindex':'50', 'bgcolor':'#0000FF', 'opacity':'70'});
  // Because options is JSON opacity/zindex/bgcolor are all optional and can appear
  // in any order.  Pass only the properties you need to set.
  var options = options || {}; 
  var zindex = options.zindex || 50;
  var opacity = options.opacity || 70;
  var opaque = (opacity / 100);
  var bgcolor = options.bgcolor || '#000000';
  var dark=document.getElementById('darkenScreenObject');
  if (!dark) {
    // The dark layer doesn't exist, it's never been created.  So we'll
    // create it here and apply some basic styles.
    // If you are getting errors in IE see: http://support.microsoft.com/default.aspx/kb/927917
    var tbody = document.getElementsByTagName("body")[0];
    var tnode = document.createElement('div');           // Create the layer.
        tnode.style.position='absolute';                 // Position absolutely
        tnode.style.top='0px';                           // In the top
        tnode.style.left='0px';                          // Left corner of the page
        tnode.style.overflow='hidden';                   // Try to avoid making scroll bars            
        tnode.style.display='none';                      // Start out Hidden
        tnode.id='darkenScreenObject';
    tbody.appendChild(tnode);                            // Add it to the web page
    dark=document.getElementById('darkenScreenObject');  // Get the object.
  }
  if (vis) {
    // Calculate the page width and height 
    /*if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
        var pageWidth = document.body.scrollWidth+'px';
        var pageHeight = document.body.scrollHeight+'px';
    } else if( document.body.offsetWidth ) {
      var pageWidth = document.body.offsetWidth+'px';
      var pageHeight = document.body.offsetHeight+'px';
    } else {
       var pageWidth='100%';
       var pageHeight='100%';
    }   */
    
    // Overwrite flawed pageHeight determination
    setPageSize();

    pageWidth=pageWidth + "px";
    pageHeight=pageHeight + "px";
       
    //set the shader to cover the entire page and make it visible.
    dark.style.opacity=opaque;                      
    dark.style.MozOpacity=opaque;                   
    dark.style.filter='alpha(opacity='+opacity+')'; 
    dark.style.zIndex=zindex;        
    dark.style.backgroundColor=bgcolor;  
    dark.style.width= pageWidth;
    dark.style.height= pageHeight;
    $('#darkenScreenObject').fadeIn();
    //dark.style.display='block';    
    dark.onclick=function(evt){
        if(js_doesPageHaveFlashAndGrey && js_hideFlashOnGrey)
        {
            // Right now the only instance where we have to rediplay Flash
            // is on the gallery page, so let's do that.  Later, we can extend
            //myTimeout=setTimeout('$("#GalleryPluginFlashWrapper").show()',500);
	        $("#GalleryPluginContent").show();
        }
        $('#FloatingModalContent').fadeOut();
        grayOut(false);
    };
     } else {
    $('#darkenScreenObject').fadeOut();
     //dark.style.display='none';
  }
}	

// Borrowed Lightbox's PageSize
function setPageSize()	
{        
     var xScroll, yScroll;
	
    if (window.innerHeight && window.scrollMaxY) {	
	    xScroll = window.innerWidth + window.scrollMaxX;
	    yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
	    xScroll = document.body.scrollWidth;
	    yScroll = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	    xScroll = document.body.offsetWidth;
	    yScroll = document.body.offsetHeight;
    }
	
    var windowWidth, windowHeight;
	
    if (self.innerHeight) {	// all except Explorer
	    if(document.documentElement.clientWidth){
		    windowWidth = document.documentElement.clientWidth; 
	    } else {
		    windowWidth = self.innerWidth;
	    }
	    windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	    windowWidth = document.documentElement.clientWidth;
	    windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
	    windowWidth = document.body.clientWidth;
	    windowHeight = document.body.clientHeight;
    }	
	
    // for small pages with total height less then height of the viewport
    if(yScroll < windowHeight){
	    pageHeight = windowHeight;
    } else { 
	    pageHeight = yScroll;
    }

    // for small pages with total width less then width of the viewport
    if(xScroll < windowWidth){	
	    pageWidth = xScroll;		
    } else {
	    pageWidth = windowWidth;
    }
    
        
    // Hack based on content
    if (js_isiepc && js_overwriteIEheight)
    {
        pageHeight=js_specialIEPageHeight;
        if (pageHeight==0)
        {
            pageHeight=1289;
        }
        if (js_issignup_on || js_isshare_on)
        {
            pageHeight=pageHeight+70;
        }
    }
}

// Resizer
function resizeGreyBox()
{
    if (js_isGreyBoxOn)
    {
        setPageSize();
    }
    else
    {
        pageWidth=1;
        pageHeight=1;
    }
    
    pageWidth=pageWidth + "px";
    pageHeight=pageHeight + "px";
    
    var dark=document.getElementById('darkenScreenObject');
    dark.style.width= pageWidth;
    dark.style.height= pageHeight;
}

// Global Init

function global_init() {

	nav_events_off=new Image;
	nav_events_off.src=js_root + "images/nav/nav_events.jpg";
	nav_events_roll=new Image;
	nav_events_roll.src=js_root + "images/nav/nav_events_roll.jpg";
	nav_events_red=new Image;
	nav_events_red.src=js_root + "images/nav/nav_events_red.jpg";

	nav_gallery_off=new Image;
	nav_gallery_off.src=js_root + "images/nav/nav_gallery.jpg";
	nav_gallery_roll=new Image;
	nav_gallery_roll.src=js_root + "images/nav/nav_gallery_roll.jpg";
	nav_gallery_red=new Image;
	nav_gallery_red.src=js_root + "images/nav/nav_gallery_red.jpg";
	
	nav_interactive_off=new Image;
	nav_interactive_off.src=js_root + "images/nav/nav_interactive.jpg";
	nav_interactive_roll=new Image;
	nav_interactive_roll.src=js_root + "images/nav/nav_interactive_roll.jpg";
	nav_interactive_red=new Image;
	nav_interactive_red.src=js_root + "images/nav/nav_interactive_red.jpg";
	
	nav_panel_off=new Image;
	nav_panel_off.src=js_root + "images/nav/nav_panel.jpg";
	nav_panel_roll=new Image;
	nav_panel_roll.src=js_root + "images/nav/nav_panel_roll.jpg";
	nav_panel_red=new Image;
	nav_panel_red.src=js_root + "images/nav/nav_panel_red.jpg";
	
	nav_history_off=new Image;
	nav_history_off.src=js_root + "images/nav/nav_history.jpg";
	nav_history_roll=new Image;
	nav_history_roll.src=js_root + "images/nav/nav_history_roll.jpg";
	nav_history_red=new Image;
	nav_history_red.src=js_root + "images/nav/nav_history_red.jpg";
	
	nav_who_off=new Image;
	nav_who_off.src=js_root + "images/nav/nav_who.jpg";
	nav_who_roll=new Image;
	nav_who_roll.src=js_root + "images/nav/nav_who_roll.jpg";
	nav_who_red=new Image;
	nav_who_red.src=js_root + "images/nav/nav_who_red.jpg";

	nav_signup_off=new Image;
	nav_signup_off.src=js_root + "images/nav/nav_signup.jpg";
	nav_signup_roll=new Image;
	nav_signup_roll.src=js_root + "images/nav/nav_signup_roll.jpg";
	nav_signup_on=new Image;
	nav_signup_on.src=js_root + "images/nav/nav_signup_on.jpg";

	nav_signup_share_on=new Image;
	nav_signup_share_on.src=js_root + "images/nav/nav_signup_share_on.jpg";
	nav_share_signup_on=new Image;
	nav_share_signup_on.src=js_root + "images/nav/nav_share_signup_on.jpg";

	nav_signup_roll_share_on=new Image;
	nav_signup_roll_share_on.src=js_root + "images/nav/nav_signup_roll_share_on.jpg";
	nav_share_roll_signup_on=new Image;
	nav_share_roll_signup_on.src=js_root + "images/nav/nav_share_roll_signup_on.jpg";

	nav_share_signup_off=new Image;
	nav_share_signup_off.src=js_root + "images/nav/nav_share.jpg";
	nav_share_signup_roll=new Image;
	nav_share_signup_roll.src=js_root + "images/nav/nav_share_signup_roll.jpg";
		
	nav_share_off=new Image;
	nav_share_off.src=js_root + "images/nav/nav_share.jpg";
	nav_share_roll=new Image;
	nav_share_roll.src=js_root + "images/nav/nav_share_roll.jpg";
	nav_share_on=new Image;
	nav_share_on.src=js_root + "images/nav/nav_share_on.jpg";

	nav_right_off=new Image;
	nav_right_off.src=js_root + "images/nav/nav_right.jpg";
	nav_right_on=new Image;
	nav_right_on.src=js_root + "images/nav/nav_right_on.jpg";

	nav_left_off=new Image;
	nav_left_off.src=js_root + "images/nav/nav_left.jpg";
	nav_left_red=new Image;
	nav_left_red.src=js_root + "images/nav/nav_left_red.jpg";
	
	nav_tabs_off=new Image;
	nav_tabs_off.src=js_root + "images/nav/nav_tabs.jpg";
	nav_tabs_red=new Image;
	nav_tabs_red.src=js_root + "images/nav/nav_tabs_red.jpg";
		
    nav_sub_attractor_off=new Image;
	nav_sub_attractor_off.src=js_root + "images/nav/nav_sub_attractor_off.gif";
	nav_sub_attractor_roll=new Image;
	nav_sub_attractor_roll.src=js_root + "images/nav/nav_sub_attractor_roll.gif";

	nav_sub_3d_off=new Image;
	nav_sub_3d_off.src=js_root + "images/nav/nav_sub_3d_off.gif";
	nav_sub_3d_roll=new Image;
	nav_sub_3d_roll.src=js_root + "images/nav/nav_sub_3d_roll.gif";

	nav_sub_photo_off=new Image;
	nav_sub_photo_off.src=js_root + "images/nav/nav_sub_photo_off.gif";
	nav_sub_photo_roll=new Image;
	nav_sub_photo_roll.src=js_root + "images/nav/nav_sub_photo_roll.gif";

	nav_sub_manipulate_off=new Image;
	nav_sub_manipulate_off.src=js_root + "images/nav/nav_sub_manipulate_off.gif";
	nav_sub_manipulate_roll=new Image;
	nav_sub_manipulate_roll.src=js_root + "images/nav/nav_sub_manipulate_roll.gif";

	nav_sub_member_off=new Image;
	nav_sub_member_off.src=js_root + "images/nav/nav_sub_member_off.gif";
	nav_sub_member_roll=new Image;
	nav_sub_member_roll.src=js_root + "images/nav/nav_sub_member_roll.gif";

	signup_submit_off=new Image;
	signup_submit_off.src=js_root + "images/top/signup_submit_off.jpg";
	signup_submit_roll=new Image;
	signup_submit_roll.src=js_root + "images/top/signup_submit_roll.jpg";

	share_submit_off=new Image;
	share_submit_off.src=js_root + "images/top/share_submit_off.gif";
	share_submit_roll=new Image;
	share_submit_roll.src=js_root + "images/top/share_submit_roll.gif";
	
	top_close_off=new Image;
	top_close_off.src=js_root + "images/top/top_close.gif";
	top_close_roll=new Image;
	top_close_roll.src=js_root + "images/top/top_close_roll.gif";

	top_close_share_off=new Image;
	top_close_share_off.src=js_root + "images/top/top_close.gif";
	top_close_share_roll=new Image;
	top_close_share_roll.src=js_root + "images/top/top_close_roll.gif";
	
	share_submit_off=new Image;
	share_submit_off.src=js_root + "images/top/share_submit_off.gif";
	share_submit_roll=new Image;
	share_submit_roll.src=js_root + "images/top/share_submit_roll.gif";

	share_digg_off=new Image;
	share_digg_off.src=js_root + "images/top/share_digg_off.jpg";
	share_digg_roll=new Image;
	share_digg_roll.src=js_root + "images/top/share_digg_roll.jpg";

	share_delicious_off=new Image;
	share_delicious_off.src=js_root + "images/top/share_delicious_off.jpg";
	share_delicious_roll=new Image;
	share_delicious_roll.src=js_root + "images/top/share_delicious_roll.jpg";

	share_newvine_off=new Image;
	share_newvine_off.src=js_root + "images/top/share_newvine_off.jpg";
	share_newvine_roll=new Image;
	share_newvine_roll.src=js_root + "images/top/share_newvine_roll.jpg";

	share_facebook_off=new Image;
	share_facebook_off.src=js_root + "images/top/share_facebook_off.jpg";
	share_facebook_roll=new Image;
	share_facebook_roll.src=js_root + "images/top/share_facebook_roll.jpg";

	share_yahoo_off=new Image;
	share_yahoo_off.src=js_root + "images/top/share_yahoo_off.jpg";
	share_yahoo_roll=new Image;
	share_yahoo_roll.src=js_root + "images/top/share_yahoo_roll.jpg";

	share_myspace_off=new Image;
	share_myspace_off.src=js_root + "images/top/share_myspace_off.jpg";
	share_myspace_roll=new Image;
	share_myspace_roll.src=js_root + "images/top/share_myspace_roll.jpg";
			
	// Handle the top content
	
	if (js_issignup_on) 
	{
	    js_issignup_on=false;
        myTimeout=setTimeout("ToggleIndividualTopContent('signup')",500);
	}
	else 
	{
        if (js_isshare_on) 
        {
	        js_isshare_on=false;
            myTimeout=setTimeout("ToggleIndividualTopContent('share')",500);
        }
	}
}	



