﻿/*Event.observe(window, 'load', function() 
    {   
        curvy(); 
        tabLoad(); //for HTML testing only
        
        /*These should always be last in the list so that
        the page displays after all functions have exectued.*/        
        
      /*  document.getElementById("page_load").style.display = "none";
        document.getElementById("page_area").style.visibility = "visible";
    }
);
*/

window.onload = init;

function init () 
{
        curvy(); 
      //  tabLoad(); //for HTML testing only        
        document.getElementById("page_load").style.display = "none";
        document.getElementById("page_area").style.visibility = "visible";
}


//Rounded corners generation
function curvy()
{     
      settingsAllCorners = {
          tl: { radius: 5 },
          tr: { radius: 5 },
          bl: { radius: 5 },
          br: { radius: 5 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div", "form", "span", "p"]
      }
      
       settingsBtmCorners = {
          tl: false,
          tr: false,
          bl: { radius: 5 },
          br: { radius: 5 },
          antiAlias: true,
          autoPad: false,
          validTags: ["div", "form", "span", "p"]
      }
      
      
     
     
      var roundAllCorners = new curvyCorners(settingsAllCorners, "roundAll");
      var roundBtmCorners = new curvyCorners(settingsBtmCorners, "roundBtm");
      
      roundAllCorners.applyCornersToAll();           
      roundBtmCorners.applyCornersToAll();     
     
}



function tabLoad ()
{           
    if (uri.args != "")
    {
       var fullURL = parent.document.URL;  
       var tabID = fullURL.substring(fullURL.indexOf('?')+5, fullURL.length)
       tab_swap("tab_" + tabID );        
    }   
      
    
}

/*function tab_swap (tab)
{    
    document.getElementById("tab_details").style.display = "none";
    document.getElementById("tab_compatible").style.display = "none";
    document.getElementById("tab_details_nav").className = "";
    document.getElementById("tab_compatible_nav").className = "";
    
    
    document.getElementById(tab).style.display = "block";
    document.getElementById(tab + "_nav").className = "current";        
       
}*/

function tab_swap (type, tab)
{   
	switch(type) {
		case "brew": 
    document.getElementById("tab_details").style.display = "none";
    document.getElementById("tab_compatible").style.display = "none";
    document.getElementById("tab_details_nav").className = "";
    document.getElementById("tab_compatible_nav").className = "";
    	break;
		
		case "rhapDevices":
    /*Rhapsody - Device page tabs*/
	document.getElementById("tab_vcastphones").style.display = "none";
    document.getElementById("tab_rhapsodyphones").style.display = "none";
    document.getElementById("tab_vcastphones_nav").className = "";
    document.getElementById("tab_rhapsodyphones_nav").className = "";
		break;
		
	/*	case "rhapHIW":
    Rhapsody - How To Buy - How It Works tabs
	document.getElementById("tab_subscribeRhap").style.display = "none";
    document.getElementById("tab_buyMusicComp").style.display = "none";
	document.getElementById("tab_buyMusicPhone").style.display = "none";
    document.getElementById("tab_subscribeRhap_nav").className = "off";
    document.getElementById("tab_buyMusicComp_nav").className = "off";
	document.getElementById("tab_buyMusicPhone_nav").className = "off";
		break;	*/
		
		case "rhapTutor":
    /*Rhapsody - Tutorials - Tutorials tabs*/
	document.getElementById("tab_welcome").style.display = "none";
    document.getElementById("tab_listen").style.display = "none";
	document.getElementById("tab_installing").style.display = "none";
	document.getElementById("tab_purchaseOnPhone").style.display = "none";
	document.getElementById("tab_purchaseOnComp").style.display = "none";
	document.getElementById("tab_transfer").style.display = "none";
	document.getElementById("tab_channels").style.display = "none";
	
	document.getElementById("tab_welcome_bottom").style.display = "none";
    document.getElementById("tab_listen_bottom").style.display = "none";
	document.getElementById("tab_installing_bottom").style.display = "none";
	document.getElementById("tab_purchaseOnPhone_bottom").style.display = "none";
	document.getElementById("tab_purchaseOnComp_bottom").style.display = "none";
	document.getElementById("tab_transfer_bottom").style.display = "none";
	document.getElementById("tab_channels_bottom").style.display = "none";
	
    document.getElementById("tab_welcome_nav").className = "";
    document.getElementById("tab_listen_nav").className = "";
	document.getElementById("tab_installing_nav").className = "";
	document.getElementById("tab_purchaseOnPhone_nav").className = "";
    document.getElementById("tab_purchaseOnComp_nav").className = "";
	document.getElementById("tab_transfer_nav").className = "";
	document.getElementById("tab_channels_nav").className = "";
	
	document.getElementById(tab + "_bottom").style.display = "block";
		break;	
	}
    document.getElementById(tab).style.display = "block";
    document.getElementById(tab + "_nav").className = "current";        
       
}



function tab_swap_rhapHIW (tab, whereAt)
{   

	switch(whereAt) {       
		case "top":
	document.getElementById("tab_subscribeRhap_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_top_nav_on.gif')";
	document.getElementById("tab_subscribeRhap_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_nav_off.gif')";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_tall_nav_off.gif')";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_btm_nav_off.gif')";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_subscribeRhap_nav").className = "tab_subscribeRhap_nav_current";
	document.getElementById("tab_buyMediaStore_nav").className = "tab_buyMusicComp_nav_off";
    document.getElementById("tab_buyMusicComp_nav").className = "tab_buyMusicComp_nav_off";
	document.getElementById("tab_buyMusicPhone_nav").className = "tab_buyMusicPhone_nav_off";
	document.getElementById("tab_subscribeRhap").style.display = "block";
	document.getElementById("tab_buyMediaStore").style.display = "none";
	document.getElementById("tab_buyMusicComp").style.display = "none";
	document.getElementById("tab_buyMusicPhone").style.display = "none";
		break;
		
		case "mid_MS":
	document.getElementById("tab_subscribeRhap_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_top_nav_off.gif')";
	document.getElementById("tab_subscribeRhap_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_nav_on.gif')";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_tall_nav_off.gif')";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_btm_nav_off.gif')";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_subscribeRhap_nav").className = "tab_subscribeRhap_nav_off";
	document.getElementById("tab_buyMediaStore_nav").className = "tab_buyMusicComp_nav_current";
    document.getElementById("tab_buyMusicComp_nav").className = "tab_buyMusicComp_nav_off";
	document.getElementById("tab_buyMusicPhone_nav").className = "tab_buyMusicPhone_nav_off";
	document.getElementById("tab_subscribeRhap").style.display = "none";
	document.getElementById("tab_buyMediaStore").style.display = "block";
	document.getElementById("tab_buyMusicComp").style.display = "none";
	document.getElementById("tab_buyMusicPhone").style.display = "none";
		break;
		
		case "mid":
	document.getElementById("tab_subscribeRhap_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_top_nav_off.gif')";
	document.getElementById("tab_subscribeRhap_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_nav_off.gif')";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_tall_nav_on.gif')";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_btm_nav_off.gif')";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_subscribeRhap_nav").className = "tab_subscribeRhap_nav_off";
	document.getElementById("tab_buyMediaStore_nav").className = "tab_buyMusicComp_nav_off";
    document.getElementById("tab_buyMusicComp_nav").className = "tab_buyMusicComp_nav_current";
	document.getElementById("tab_buyMusicPhone_nav").className = "tab_buyMusicPhone_nav_off";
	document.getElementById("tab_subscribeRhap").style.display = "none";
	document.getElementById("tab_buyMediaStore").style.display = "none";
	document.getElementById("tab_buyMusicComp").style.display = "block";
	document.getElementById("tab_buyMusicPhone").style.display = "none";
		break;
		
		case "btm":
	document.getElementById("tab_subscribeRhap_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_top_nav_off.gif')";
	document.getElementById("tab_subscribeRhap_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_nav_off.gif')";
	document.getElementById("tab_buyMediaStore_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_mid_tall_nav_off.gif')";
	document.getElementById("tab_buyMusicComp_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundImage = "url('imgs/rhapsody/how_it_works_btm_nav_on.gif')";
	document.getElementById("tab_buyMusicPhone_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_subscribeRhap_nav").className = "tab_subscribeRhap_nav_off";
	document.getElementById("tab_buyMediaStore_nav").className = "tab_buyMusicComp_nav_off";
    document.getElementById("tab_buyMusicComp_nav").className = "tab_buyMusicComp_nav_off";
	document.getElementById("tab_buyMusicPhone_nav").className = "tab_buyMusicPhone_nav_current";
	document.getElementById("tab_subscribeRhap").style.display = "none";
	document.getElementById("tab_buyMediaStore").style.display = "none";
	document.getElementById("tab_buyMusicComp").style.display = "none";
	document.getElementById("tab_buyMusicPhone").style.display = "block";
		break;
	
	}

}


function tab_swap_rhapTut (tab, whereAt)
{   

	switch(whereAt) {       
		case "beforeYouBegin":
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_top_nav_small_on.gif')";
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_gettingStarted_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_gettingStarted_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_findingMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_findingMusic_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_big_nav_off.gif')";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_exploringMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_btm_nav_big_off.gif')";
	document.getElementById("tab_exploringMusic_nav").style.backgroundColor = "#898989";
	
	document.getElementById("tab_beforeYouBegin_nav").className = "tab_beforeYouBegin_nav_current";
    document.getElementById("tab_gettingStarted_nav").className = "tab_gettingStarted_nav_off";
	document.getElementById("tab_findingMusic_nav").className = "tab_findingMusic_nav_off";
	document.getElementById("tab_purchasingOrganizing_nav").className = "tab_purchasingOrganizing_nav_off";
	document.getElementById("tab_exploringMusic_nav").className = "tab_exploringMusic_nav_off";
	
	document.getElementById("tab_beforeYouBegin").style.display = "block";
	document.getElementById("tab_gettingStarted").style.display = "none";
	document.getElementById("tab_findingMusic").style.display = "none";
	document.getElementById("tab_purchasingOrganizing").style.display = "none";
	document.getElementById("tab_exploringMusic").style.display = "none";
		break;
		
		case "gettingStarted":
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_top_nav_small_off.gif')";
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_gettingStarted_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_on.gif')";
	document.getElementById("tab_gettingStarted_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_findingMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_findingMusic_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_big_nav_off.gif')";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_exploringMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_btm_nav_big_off.gif')";
	document.getElementById("tab_exploringMusic_nav").style.backgroundColor = "#898989";
	
	document.getElementById("tab_beforeYouBegin_nav").className = "tab_beforeYouBegin_nav_off";
    document.getElementById("tab_gettingStarted_nav").className = "tab_gettingStarted_nav_current";
	document.getElementById("tab_findingMusic_nav").className = "tab_findingMusic_nav_off";
	document.getElementById("tab_purchasingOrganizing_nav").className = "tab_purchasingOrganizing_nav_off";
	document.getElementById("tab_exploringMusic_nav").className = "tab_exploringMusic_nav_off";
	
	document.getElementById("tab_beforeYouBegin").style.display = "none";
	document.getElementById("tab_gettingStarted").style.display = "block";
	document.getElementById("tab_findingMusic").style.display = "none";
	document.getElementById("tab_purchasingOrganizing").style.display = "none";
	document.getElementById("tab_exploringMusic").style.display = "none";
		break;
		
		
		case "findingMusic":
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_top_nav_small_off.gif')";
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_gettingStarted_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_gettingStarted_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_findingMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_on.gif')";
	document.getElementById("tab_findingMusic_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_big_nav_off.gif')";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_exploringMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_btm_nav_big_off.gif')";
	document.getElementById("tab_exploringMusic_nav").style.backgroundColor = "#898989";
	
	document.getElementById("tab_beforeYouBegin_nav").className = "tab_beforeYouBegin_nav_off";
    document.getElementById("tab_gettingStarted_nav").className = "tab_gettingStarted_nav_off";
	document.getElementById("tab_findingMusic_nav").className = "tab_findingMusic_nav_current";
	document.getElementById("tab_purchasingOrganizing_nav").className = "tab_purchasingOrganizing_nav_off";
	document.getElementById("tab_exploringMusic_nav").className = "tab_exploringMusic_nav_off";
	
	document.getElementById("tab_beforeYouBegin").style.display = "none";
	document.getElementById("tab_gettingStarted").style.display = "none";
	document.getElementById("tab_findingMusic").style.display = "block";
	document.getElementById("tab_purchasingOrganizing").style.display = "none";
	document.getElementById("tab_exploringMusic").style.display = "none";
		break;
		
		case "purchasingOrganizing":
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_top_nav_small_off.gif')";
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_gettingStarted_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_gettingStarted_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_findingMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_findingMusic_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_big_nav_on.gif')";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundColor = "#cc3300";
	document.getElementById("tab_exploringMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_btm_nav_big_off.gif')";
	document.getElementById("tab_exploringMusic_nav").style.backgroundColor = "#898989";
	
	document.getElementById("tab_beforeYouBegin_nav").className = "tab_beforeYouBegin_nav_off";
    document.getElementById("tab_gettingStarted_nav").className = "tab_gettingStarted_nav_off";
	document.getElementById("tab_findingMusic_nav").className = "tab_findingMusic_nav_off";
	document.getElementById("tab_purchasingOrganizing_nav").className = "tab_purchasingOrganizing_nav_current";
	document.getElementById("tab_exploringMusic_nav").className = "tab_exploringMusic_nav_off";
	
	document.getElementById("tab_beforeYouBegin").style.display = "none";
	document.getElementById("tab_gettingStarted").style.display = "none";
	document.getElementById("tab_findingMusic").style.display = "none";
	document.getElementById("tab_purchasingOrganizing").style.display = "block";
	document.getElementById("tab_exploringMusic").style.display = "none";
		break;
		
		case "exploringMusic":
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_top_nav_small_off.gif')";
	document.getElementById("tab_beforeYouBegin_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_gettingStarted_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_gettingStarted_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_findingMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_small_nav_off.gif')";
	document.getElementById("tab_findingMusic_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_mid_big_nav_off.gif')";
	document.getElementById("tab_purchasingOrganizing_nav").style.backgroundColor = "#898989";
	document.getElementById("tab_exploringMusic_nav").style.backgroundImage = "url('imgs/rhapsody/tutor_btm_nav_big_on.gif')";
	document.getElementById("tab_exploringMusic_nav").style.backgroundColor = "#cc3300";
	
	document.getElementById("tab_beforeYouBegin_nav").className = "tab_beforeYouBegin_nav_off";
    document.getElementById("tab_gettingStarted_nav").className = "tab_gettingStarted_nav_off";
	document.getElementById("tab_findingMusic_nav").className = "tab_findingMusic_nav_off";
	document.getElementById("tab_purchasingOrganizing_nav").className = "tab_purchasingOrganizing_nav_off";
	document.getElementById("tab_exploringMusic_nav").className = "tab_exploringMusic_nav_current";
	
	document.getElementById("tab_beforeYouBegin").style.display = "none";
	document.getElementById("tab_gettingStarted").style.display = "none";
	document.getElementById("tab_findingMusic").style.display = "none";
	document.getElementById("tab_purchasingOrganizing").style.display = "none";
	document.getElementById("tab_exploringMusic").style.display = "block";
		break;
	
	}

}


var uri = new Object();
getURL(uri);
                 
function getURL(uri) 
{
    uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
    uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
    uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
    uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
    pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
    pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
    uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
    uri.file = uri.page;
    if (uri.ext != '') uri.file += '.' + uri.ext;
    if (uri.file == '') uri.page = 'index';
    uri.args = location.search.substr(1).split("?");
    return uri;
    
}

function tip_swap (tip)
{   
	document.getElementById(tip).style.display=(document.getElementById(tip).style.display!="block")? "block" : "none"
	//alert(document.getElementById(tip).style.display);
	
	var arrowCheck = document.getElementById(tip + "_arrow").src.indexOf("down");
	theArrowToShow = "";
	
	if (arrowCheck < 1) 
	  {theArrowToShow = "expand";}
	else 
	  {theArrowToShow = "down";}
	
	document.getElementById(tip + "_arrow").src=(theArrowToShow!="down")? "imgs/rhapsody/down_arrow.gif" : "imgs/rhapsody/expand_arrow.gif"
	//alert(document.getElementById(tip + "_arrow").src);
	
	switch(tip) {
		case "tip_1": 
    document.getElementById("tip_2").style.display = "none";
	document.getElementById("tip_2_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    document.getElementById("tip_3").style.display = "none";
	document.getElementById("tip_3_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    	break;
		
		case "tip_2": 
    document.getElementById("tip_1").style.display = "none";
	document.getElementById("tip_1_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    document.getElementById("tip_3").style.display = "none";
	document.getElementById("tip_3_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    	break;
		
		case "tip_3": 
    document.getElementById("tip_1").style.display = "none";
	document.getElementById("tip_1_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    document.getElementById("tip_2").style.display = "none";
	document.getElementById("tip_2_arrow").src = "imgs/rhapsody/expand_arrow.gif";
    	break;
	}
}

function sendFriendLayer (firstID, secID)
{   
	document.getElementById(firstID).style.display = "none";
	//document.getElementById(firstID).style.display=(document.getElementById(firstID).style.display!="block")? "block" : "none"
	document.getElementById(secID).style.display = "block";
	//alert(document.getElementById(theID).style.display);
}

                  