var kh_My_PlayList = new Object();
var kh_My_PlayList_Count = 0;
var currSectionNav = "scTop";
var secNav_TimeOut;
var nav_pad_right;
var playnav_pad_right;

var kh_Nav_Widths = new Object();
kh_Nav_Widths['scTop'] = '83px';
kh_Nav_Widths['scMessage'] = '83px';
kh_Nav_Widths['scIndex'] = '83px';
kh_Nav_Widths['scTree'] = '83px';
kh_Nav_Widths['scTE'] = '83px';
kh_Nav_Widths['scNews'] = '60px';
kh_Nav_Widths['scPhoto'] = '60px';
kh_Nav_Widths['scFilm'] = '60px';
kh_Nav_Widths['scAudio'] = '60px';
kh_Nav_Widths['scNews'] = '60px';
kh_Nav_Widths['scRSS'] = '60px';
kh_Nav_Widths['scWAP'] = '60px';
kh_Nav_Widths['scIReport'] = '83px';
kh_Nav_Widths['scSMS'] = '60px';
kh_Nav_Widths['scOther'] = '20px';

var first_time = false;
var loadingSection = '';

function xmlSlice(val) {
	return val.slice(val.lastIndexOf('/')+1,val.lastIndexOf('.'));
}

function load_Section(nav_section_id, xml_file_url, is_by_section, firstTime) {
	if (1==1) { //currSectionNav != nav_section_id || firstTime == true
		loadingSection = xmlSlice(xml_file_url);

		clearTimeout(secNav_TimeOut);
		if (document.getElementById) { document.getElementById(currSectionNav + '_R').style.width = kh_Nav_Widths[currSectionNav]; }
		else if (document.all) { document.all[currSectionNav + '_R'].style.width = kh_Nav_Widths[currSectionNav]; }

		document.getElementById(nav_section_id).className += "_active";
		document.getElementById(currSectionNav).className =
		    document.getElementById(currSectionNav).className.replace("_active","");

		WTPO_writeToLayer("", "Secton_Box_Container");

		nav_pad_right = 54;
		kh_slideNav(nav_section_id + '_R', xml_file_url);

		currSectionNav = nav_section_id;
	}
}

function kh_slideNav(nav_corner_id, file_url, slide_width) {
	nav_pad_right += 10;
	if(!slide_width) { slide_width = 114; }

	if(nav_pad_right <= slide_width) {
		if (document.getElementById) {
		    document.getElementById(nav_corner_id).style.width = nav_pad_right + 'px';
		}
		else if (document.all) { document.all[nav_corner_id].style.width = nav_pad_right + 'px'; }

		temp_to_str = "kh_slideNav('" + nav_corner_id + "','" + file_url + "', '" + slide_width + "')";
		secNav_TimeOut = setTimeout(temp_to_str,20)
	}
	else
	{
		clearTimeout(secNav_TimeOut);

		var obj = document.getElementById("Secton_Box_Container");
		//obj.style.height = "100%";

    if(file_url) {
		    if (pageName == "search/index")
		    {
		        SE_generateSearchResult(1);
		    }
            else if (pageName == "archive/index")
		    {
		        SE_generateArchiveResult(1);
		    }else {
		        getList("Secton_Box_Container", file_url);
		    }
		}
	}
}

