function show_My_Profile()
{
	document.getElementById('My_Profile_Hide').style.visibility = 'visible';
	document.getElementById('My_Profile_Hide').style.display = 'block';

	document.getElementById('My_Profile_Details').style.visibility = 'visible';
	document.getElementById('My_Profile_Details').style.display = 'block';

	document.getElementById('My_Profile_Show').style.visibility = 'hidden';
	document.getElementById('My_Profile_Show').style.display = 'none';
	
	leftMenuStatus('myprofile','show',0);
	Resize_iFrame();
}

function hide_My_Profile()
{
	document.getElementById('My_Profile_Show').style.visibility = 'visible';
	document.getElementById('My_Profile_Show').style.display = 'block';

	document.getElementById('My_Profile_Details').style.visibility = 'hidden';
	document.getElementById('My_Profile_Details').style.display = 'none';

	document.getElementById('My_Profile_Hide').style.visibility = 'hidden';
	document.getElementById('My_Profile_Hide').style.display = 'none';
	
	leftMenuStatus('myprofile','hide',0);
	Resize_iFrame();
}

function show_My_Video()
{
	document.getElementById('My_Video_Hide').style.visibility = 'visible';
	document.getElementById('My_Video_Hide').style.display = 'block';

	document.getElementById('My_Video_Details').style.visibility = 'visible';
	document.getElementById('My_Video_Details').style.display = 'block';

	document.getElementById('My_Video_Show').style.visibility = 'hidden';
	document.getElementById('My_Video_Show').style.display = 'none';
	
	leftMenuStatus('myvideo','show',0);
	Resize_iFrame();
}

function hide_My_Video()
{
	document.getElementById('My_Video_Show').style.visibility = 'visible';
	document.getElementById('My_Video_Show').style.display = 'block';

	document.getElementById('My_Video_Details').style.visibility = 'hidden';
	document.getElementById('My_Video_Details').style.display = 'none';

	document.getElementById('My_Video_Hide').style.visibility = 'hidden';
	document.getElementById('My_Video_Hide').style.display = 'none';
	
	leftMenuStatus('myvideo','hide',0);
	Resize_iFrame();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/********************************************************
Function : Show_Channels()
*********************************************************/

function Show_Channels()
{
	document.getElementById('hide_channels').style.visibility = 'visible';
	document.getElementById('hide_channels').style.display = 'block';

	document.getElementById('show_channels').style.visibility = 'hidden';
	document.getElementById('show_channels').style.display = 'none';

	document.getElementById('Channel_List').style.visibility = 'visible';
	document.getElementById('Channel_List').style.display = 'block';
	
	leftMenuStatus('mytvchannel','show',0);
	Resize_iFrame();
}

/********************************************************
Function : Show_Channels()
*********************************************************/
function Hide_Channels()
{
	document.getElementById('show_channels').style.visibility = 'visible';
	document.getElementById('show_channels').style.display = 'block';

	document.getElementById('hide_channels').style.visibility = 'hidden';
	document.getElementById('hide_channels').style.display = 'none';

	document.getElementById('Channel_List').style.visibility = 'hidden';
	document.getElementById('Channel_List').style.display = 'none';
	
	leftMenuStatus('mytvchannel','hide',0);
	Resize_iFrame();
}
// For Diaplay channel details
function Show_Channel_Detail(ch_id)
{
	//document.getElementById("ch_name_"+ch_id).style.visibility = 'hidden';
	//document.getElementById("ch_name_"+ch_id).style.display = '';

	document.getElementById("arrow_01_"+ch_id).style.visibility = 'visible';
	document.getElementById("arrow_01_"+ch_id).style.display = 'block';

	document.getElementById("arrow_02_"+ch_id).style.visibility = 'hidden';
	document.getElementById("arrow_02_"+ch_id).style.display = 'none';

	//document.getElementById("ch_detail_"+ch_id).style.visibility = 'visible';
	//document.getElementById("ch_detail_"+ch_id).style.display = 'block';
	
	leftMenuStatus('mytvchanneldetails','show',ch_id);
	Resize_iFrame();
}

// For Hide channel details
function Hide_Channel_Detail(ch_id)
{
	//document.getElementById("ch_name_"+ch_id).style.visibility = 'hidden';
	//document.getElementById("ch_name_"+ch_id).style.display = '';

	document.getElementById("arrow_01_"+ch_id).style.visibility = 'hidden';
	document.getElementById("arrow_01_"+ch_id).style.display = 'none';

	document.getElementById("arrow_02_"+ch_id).style.visibility = 'visible';
	document.getElementById("arrow_02_"+ch_id).style.display = 'block';

	//document.getElementById("ch_detail_"+ch_id).style.visibility = 'hidden';
	//document.getElementById("ch_detail_"+ch_id).style.display = 'none';
	
	leftMenuStatus('mytvchanneldetails','hide',ch_id);
	Resize_iFrame();
}

//
function edit_profile_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/editprofile";
	}
	else
	{
		location.href = BASE_URL + "/editprofile/editprofileinner";
	}
}
function contentlist_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/contentlist/index";
	}
	else
	{
		location.href = BASE_URL + "/contentlist/contentlist";
	}
}
function edit_tv_channel_link(channel_id)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/edit/id/" + channel_id;
	}
	else
	{
		location.href = BASE_URL + "/channel/editinner/id/" + channel_id;
	}
}
function channel_stats_link(channel_id)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/stats/id/" + channel_id;
	}
	else
	{
		location.href = BASE_URL + "/channel/statsinner/id/" + channel_id;
	}
}
function scheduling_link(channel_id)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/schedule/manual/id/" + channel_id;
	}
	else
	{
		location.href = BASE_URL + "/schedule/manualinner/id/" + channel_id;
	}
/*
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/schedule/auto/id/" + channel_id;
	}
	else
	{
		location.href = BASE_URL + "/schedule/autoinner/id/" + channel_id;
	}
*/
}
function channel_link()
{
//	alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/index";
	}
	else
	{
		location.href = BASE_URL + "/channel/indexinner";
	}
}
function preview_link(id)
{
//	alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/aggregator/id/"+id;
	}
	else
	{
		location.href = BASE_URL + "/channel/aggregatorinner/id/"+id;
	}
}
function stats_link(id)
{
//	alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/stats/id/"+id;
	}
	else
	{
		location.href = BASE_URL + "/channel/statsinner/id/"+id;
	}
}
function publish_link(id)
{
//	alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/style/id/"+id;
	}
	else
	{
		location.href = BASE_URL + "/channel/styleinner/id/"+id;
	}
}
function personal_info_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/editprofile/index";
	}
	else
	{
		location.href = BASE_URL + "/editprofile/editprofileinner";
	}
}
function settings_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/editprofile/indexsettings";
	}
	else
	{
		location.href = BASE_URL + "/editprofile/settings";
	}
}
function uploadcontent_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/uploadcontent/index";
	}
	else
	{
		location.href = BASE_URL + "/uploadcontent/uploadcontent";
	}
}
function schduling_manual_link(chid)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/schedule/manual/id/" + chid;
	}
	else
	{
		location.href = BASE_URL + "/schedule/manualinner/id/" + chid;
	}
}
function schduling_auto_link(chid)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/schedule/auto/id/" + chid;
	}
	else
	{
		location.href = BASE_URL + "/schedule/autoinner/id/" + chid;
	}
}
function channel_setting_link(chid)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/setting/id/" + chid;
	}
	else
	{
		location.href = BASE_URL + "/channel/settinginner/id/" + chid;
	}
}
function channel_type_link(chid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/type/id/" + chid;
	}
	else
	{
		location.href = BASE_URL + "/channel/typeinner/id/" + chid;
	}
}
function message_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/index";
	}
	else
	{
		location.href = BASE_URL + "/message/indexinner";
	}
}
function friends_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/friends/";
	}
	else
	{
		location.href = BASE_URL + "/friends/";
	}
}
function message_reply_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/reply/msg_id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/replyinner/msg_id/" + msgid;
	}
}
function uploadcontant_from_your_pc_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/uploadcontent/index";
	}
	else
	{
		location.href = BASE_URL + "/uploadcontent/uploadcontent";
	}
}
function uploadcontant_from_your_youtube()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/uploadcontent/indexyoutube";
	}
	else
	{
		location.href = BASE_URL + "/uploadcontent/youtube";
	}
}
function message_forward_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/forward/msg_id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/forwardinner/msg_id/" + msgid;
	}
}
function message_view_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/view/msg_id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/viewinner/msg_id/" + msgid;
	}
}
function message_compose_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/compose";
	}
	else
	{
		//alert("hello");
		location.href = BASE_URL + "/message/composeinner";
	}
}
function message_sent_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/sent";
	}
	else
	{
		location.href = BASE_URL + "/message/sentinner";
	}
}
function message_viewsent_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/viewsent/msg_id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/viewsentinner/msg_id/" + msgid;
	}
}
function message_forward1_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/forward1/msg_id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/forward1inner/msg_id/" + msgid;
	}
}
function message_by_type_link(msgid)
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/message/index/id/" + msgid;
	}
	else
	{
		location.href = BASE_URL + "/message/indexinner/id/" + msgid;
	}
}
function page_under_construction_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/page/underconstruction";
	}
	else
	{
		location.href = BASE_URL + "/page/underconstructioninner";
	}
}
function signup_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/signup/index";
	}
	else
	{
		location.href = BASE_URL + "/signup/signupindex";
	}
}

function channel_style_link(chid)
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/channel/style/id/" + chid;
	}
	else
	{
		location.href = BASE_URL + "/channel/styleinner/id/" + chid;
	}
}

function Forgot_Password_link()
{
	//alert("hello");
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/forgotpassword/index";
	}
	else
	{
		location.href = BASE_URL + "/forgotpassword/forgotpasswordindex";
	}
}

function profilehomepage_link()
{
	if(Resize_Check() == true)
	{
		parent.location = BASE_URL + "/profilehomepage/index";
	}
	else
	{
		location.href = BASE_URL + "/profilehomepage/profilehomepageinner";
	}
}

//======================================================================================================
//  Function Name :- showHint(menu,status,id)
//======================================================================================================*/
var xmlHttp
function leftMenuStatus(menu,status,id)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert("Browser does not support HTTP Request")
		return
	}
	if(id == 0)
	{
		var url = BASE_URL + "/index/leftmenusession/menu/" + menu + "/status/" + status;
	}
	else
	{
		var url = BASE_URL + "/index/leftmenusession/menu/" + menu + "/status/" + status + "/chid/" + id;
	}
	xmlHttp.onreadystatechange=menustateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

//======================================================================================================
// 	Function Name :- menustateChanged
//======================================================================================================*/
function menustateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//document.getElementById("txtHint").innerHTML=xmlHttp.responseText
	}
} 

//======================================================================================================
//  Function Name :- GetXmlHttpObject
//======================================================================================================*/
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}
