var StrXml=''
var XmlMainStories;
var TextNodeDefine
var CurrentSelectedMainThird=0
var TimerObj
var TimerFlag=true
var ICounter=0
var MainOneImages = new Array();
var MainOneLinkUrl = new Array();
var MainOneSummaryPage = new Array();
var MainOneReadAlso = new Array();
var MainStoriesHeadLine = new Array();
var StrMainOneReadAlso=''
var TimerCal
var CountMainSecondWeb2
var ResultCounter
var ImageUpID=''
var tblMainThirdScrollingHeight=''
var TimeScrollingMain
var TimeScrollingMainThird
function GetThirdProductionXml(cookieString,Obj,SelectedTap)
{
try
{
var xmlHttpThirdProduction
var InnerHTMLObj
if (Obj!=null)
InnerHTMLObj=Obj

var xmlHttpThirdProduction=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttpThirdProduction=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttpThirdProduction=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttpThirdProduction=new ActiveXObject("Microsoft.XMLHTTP");
}
}

if (xmlHttpThirdProduction==null)
{
alert ("Your browser does not support AJAX!");
return;
}

var url="/portal/aspx/GetSections.aspx";
url=url+"?Path="+cookieString+',';
url=url+"&ThirdSection=true";
if (EnableAjax=='false')
{
url=url+"&sid="+Math.random();
}

xmlHttpThirdProduction.onreadystatechange=function() {
if (xmlHttpThirdProduction.readyState==4)
{
if(document.getElementById(InnerHTMLObj))
{
document.getElementById('imgLoadingTabs').style.display='none'
if (CheckFireFox())
{
var adiv=document.createElement('div');
adiv.innerHTML=xmlHttpThirdProduction.responseText;
document.getElementById(InnerHTMLObj).appendChild(adiv)
InitialMainThirdScrollingButtons(SelectedTap)
}
else
{
document.getElementById(InnerHTMLObj).innerHTML=xmlHttpThirdProduction.responseText;
InitialMainThirdScrollingButtons(SelectedTap)
}


}
}
};
xmlHttpThirdProduction.open("GET",url,true);
xmlHttpThirdProduction.send(null);
}
catch(err)
{

}
}

function CheckFireFox()
{
if( document.implementation.hasFeature("XPath", "3.0") )
{
return true
}
else
{
return false
}
}
function DisableHighLight()
{
for (I=0;I<document.getElementsByName('tdMainStoriesSmallIMage').length;I++)
{
if (ICounter!=I)
{
document.getElementsByName('tdMainStoriesSmallIMage')[I].style.filter='Alpha(Opacity=100)'
}
else
{
document.getElementsByName('tdMainStoriesSmallIMage')[I].style.filter='Alpha(Opacity=70)'
}
}
}
function PuasePlayScrolling(Obj)
{
if(TimerObj!=null)
{
window.clearTimeout(TimerObj);
TimerObj=null
document.getElementById('imgPauseMainScrolling').src='/english/files/pauseBtnSelected.jpg'
document.getElementById('imgPauseMainScrolling').width="22"
}
else
{
NextScrollingMainWebOne();
document.getElementById('imgPauseMainScrolling').src='/english/files/pauseBtn.jpg'
document.getElementById('imgPauseMainScrolling').width="22"
}

}
function CalCulateMainStoryScrollingEnable()
{
TimeScrollingMain=window.setInterval("DisableEnableMainScrolling()",2000)
}
function CalCulateMainStoryThirdScrollingEnable()
{
TimeScrollingMainThird=window.setInterval("DisableEnableMainThirdScrolling(0)",2000)
}
function DisableEnableMainThirdScrolling()
{
if (document.getElementById('tblMainThirdScrolling'+ImageUpID).offsetHeight>0)
{
window.clearInterval(TimeScrollingMainThird)
InitialMainThirdScrollingButtons(0)
}
}
function DisableEnableMainScrolling()
{
if (document.getElementById('tblMainStoryScrolling').offsetHeight>0)
{
window.clearInterval(TimeScrollingMain)
if (document.getElementById('tblMainStoryScrolling').offsetHeight<=320)
{
document.getElementById('imgUpScrollingMain').onclick=function (){}
document.getElementById('imgDownScrollingMain').onclick=function (){}
document.getElementById('imgUpScrollingMain').src="/english/files/1.png"
document.getElementById('imgDownScrollingMain').src="/english/files/1-1.png"
document.getElementById('imgUpScrollingMain').style.cursor='default'
document.getElementById('imgDownScrollingMain').style.cursor='default'
}
else
{
document.getElementById('imgUpScrollingMain').src="/english/files/1-2.png"
document.getElementById('imgDownScrollingMain').src="/english/files/2-2.png"
document.getElementById('imgUpScrollingMain').style.cursor='default'
document.getElementById('imgDownScrollingMain').style.cursor='pointer'
}
}
}

function NextScrollingMainWebOne()
{
if (ICounter<MainOneImages.length-1)
{
DisappearMainImage('tdWeb2MainOne',50,1)
}
else
{
ICounter=0
DisappearMainImage('tdWeb2MainOne',50,1)
}
if (TimerObj!=null)
window.clearTimeout(TimerObj)

TimerObj=window.setTimeout("NextScrollingMainWebOne()",10000)

}
function PreviousScrollingMainWebOne()
{
if (ICounter>1)
{
DisappearMainImage('tdWeb2MainOne',100,2)
}
}
function DisappearMainImage(Obj,Opacity,Type)
{
DisableHighLight()
if (Opacity>=0)
{
if (!CheckFireFox())
{
document.getElementById(Obj).style.filter='Alpha(Opacity='+Opacity+')'
}
window.setTimeout("DisappearMainImage('"+Obj+"',"+eval(eval(Opacity)-eval(15))+",'"+Type+"')",1)
}
else
{
FillMainImageAndSummary(Type)
ShowMainImage(Obj,1)
}
}
function RedirectMainOneArticle(URL)
{
document.location.href=URL
}

function FillMainImageAndSummary(Type)
{
var InnerTextContent
if (CheckFireFox())
{
InnerTextContent='textContent'
}
else
{
InnerTextContent='innerText'
}

if (Type=='1')
{
ICounter++
document.getElementById('tdWeb2MainOne').src=MainOneImages[ICounter]
document.getElementById('divSummaryTextWeb2MainOne').innerHTML=MainOneSummaryPage[ICounter];
document.getElementById('tdReadAlsoWeb2MainOne').innerHTML=MainOneReadAlso[ICounter];
document.getElementById('tdWeb2MainOne').onclick=function (){document.location.href=MainOneLinkUrl[ICounter];CountAreaHits("2");}
document.getElementById('tdHeadLinesMainStories').innerHTML=MainStoriesHeadLine[ICounter]

if (document.getElementById('tdReadAlsoWeb2MainOne')[InnerTextContent]=='')
{
document.getElementById('tdImageReadAlsoHeader').style.display='none'
document.getElementById('tdDivReadAlsoHeader').style.display='none'
}
else
{
document.getElementById('tdImageReadAlsoHeader').style.display=''
document.getElementById('tdDivReadAlsoHeader').style.display=''
}
}
else if(Type=='2')
{
ICounter--
document.getElementById('tdWeb2MainOne').src=MainOneImages[ICounter]
document.getElementById('divSummaryTextWeb2MainOne').innerHTML=MainOneSummaryPage[ICounter];
document.getElementById('tdReadAlsoWeb2MainOne').innerHTML=MainOneReadAlso[ICounter];
document.getElementById('tdWeb2MainOne').onclick=function (){document.location.href=MainOneLinkUrl[ICounter];CountAreaHits("2");}
if (document.getElementById('tdReadAlsoWeb2MainOne')[InnerTextContent]=='')
{
document.getElementById('tdImageReadAlsoHeader').style.display='none'
document.getElementById('tdDivReadAlsoHeader').style.display='none'
}
else
{
document.getElementById('tdImageReadAlsoHeader').style.display=''
document.getElementById('tdDivReadAlsoHeader').style.display=''
}
}

}
function ShowMainImage(Obj,Opacity)
{
if (Opacity<=100)
{
if (!CheckFireFox())
{
document.getElementById(Obj).style.filter='Alpha(Opacity='+Opacity+')'
}
window.setTimeout("ShowMainImage('"+Obj+"',"+eval(Opacity+15)+")",1)
}
else
{
if (ICounter>=3)
{
StartScrollingDiv('+','Auto')
}
else if (ICounter==1)
{
document.getElementById('divMainSecondWeb2').scrollTop=0
SwitchScrollingImageMain(Obj)
}
}
}
function CheckMainScrollingFireFox()
{
if (CheckFireFox())
{
return 160
}
else
{
return 160
}
}
function StartScrollingDiv(ScrollingType,AutoScrolling)
{
if (TimerFlag)
{
if (ScrollingType!=null)
{
if (ScrollingType=='+')
{
TimerFlag=false;
if (AutoScrolling==null)
{
ScrollingDivToRight('divMainSecondWeb2',document.getElementById('divMainSecondWeb2').scrollTop,eval(document.getElementById('divMainSecondWeb2').scrollTop+CheckMainScrollingFireFox()))
}
else
{
ScrollingDivToRight('divMainSecondWeb2',document.getElementById('divMainSecondWeb2').scrollTop,Math.abs(eval(eval(ICounter-2)*CheckMainScrollingFireFox())))
}
}
else if(ScrollingType=='-')
{
TimerFlag=false;
ScrollingDivToLeft('divMainSecondWeb2',document.getElementById('divMainSecondWeb2').scrollTop,eval(document.getElementById('divMainSecondWeb2').scrollTop-CheckMainScrollingFireFox()))
}
}

}
}
function SwitchScrollingImageMain(Obj)
{
if (document.getElementById(Obj).scrollTop>0 && document.getElementById(Obj).scrollTop<eval(document.getElementById('tblMainStoryScrolling').offsetHeight-document.getElementById(Obj).offsetHeight))
{
document.getElementById('imgUpScrollingMain').src="/english/files/1-2.png"
document.getElementById('imgDownScrollingMain').src="/english/files/2-2.png"
document.getElementById('imgUpScrollingMain').style.cursor='pointer'
document.getElementById('imgDownScrollingMain').style.cursor='pointer'
}
else if(document.getElementById(Obj).scrollTop>0 && document.getElementById(Obj).scrollTop==eval(document.getElementById('tblMainStoryScrolling').offsetHeight-document.getElementById(Obj).offsetHeight))
{
document.getElementById('imgUpScrollingMain').src="/english/files/1-2.png"
document.getElementById('imgDownScrollingMain').src="/english/files/2-1.png"
document.getElementById('imgUpScrollingMain').style.cursor='pointer'
document.getElementById('imgDownScrollingMain').style.cursor='default'
}
else if(document.getElementById(Obj).scrollTop==0)
{
document.getElementById('imgUpScrollingMain').src="/english/files/1.png"
document.getElementById('imgDownScrollingMain').src="/english/files/2-2.png"
document.getElementById('imgUpScrollingMain').style.cursor='default'
document.getElementById('imgDownScrollingMain').style.cursor='pointer'
}
}
function ScrollingDivToRight(Obj,RightSize,EndSize)
{
if (document.getElementById(Obj).scrollTop<EndSize)
{
if (RightSize>EndSize)
{
document.getElementById(Obj).scrollTop=EndSize
SwitchScrollingImageMain(Obj)

TimerFlag=true;
}
else
{
document.getElementById(Obj).scrollTop=RightSize
TimerCal=window.setTimeout("ScrollingDivToRight('"+Obj+"',"+eval(eval(RightSize)+eval(10))+","+EndSize+")",1)
}
}
else
{
SwitchScrollingImageMain(Obj)
TimerFlag=true;
}
}
function ScrollingDivToLeft(Obj,RightSize,EndSize)
{
if (RightSize>=0)
{
if (document.getElementById(Obj).scrollTop>=EndSize)
{
if (eval(RightSize-10)<EndSize)
{
document.getElementById(Obj).scrollTop=EndSize
SwitchScrollingImageMain(Obj)

TimerFlag=true;
}
else
{
document.getElementById(Obj).scrollTop=RightSize
TimerCal=window.setTimeout("ScrollingDivToLeft('"+Obj+"',"+eval(eval(RightSize)-eval(10))+","+EndSize+")",1)
}
}
else
{
SwitchScrollingImageMain(Obj)
TimerFlag=true;
}
}
else
{
document.getElementById(Obj).scrollTop=0
SwitchScrollingImageMain(Obj)
TimerFlag=true;
}
}

try //Internet Explorer
{
TextNodeDefine='text'
XmlMainStories = new ActiveXObject("MSXML.DOMDocument")
}
catch(e)
{
try //Firefox, Mozilla, Opera, etc.
{
TextNodeDefine='textContent'
XmlMainStories=document.implementation.createDocument("","",null);
}
catch(e)
{
alert(e.message)
}
}
if (CheckFireFox())
{
XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
{
if( !xNode )
{
xNode = this;
}
var oNSResolver = this.createNSResolver(this.documentElement)
var aItems = this.evaluate(cXPathString, xNode, oNSResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
var aResult = [];
for( var i = 0; i < aItems.snapshotLength; i++)
{
aResult[i] =  aItems.snapshotItem(i);
}

return aResult;
}

Element.prototype.selectNodes = function(cXPathString)
{
if(this.ownerDocument.selectNodes)
{
return this.ownerDocument.selectNodes(cXPathString, this);
}
else
{
throw "For XML Elements Only";
}
}

XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)
{
if( !xNode )
{
xNode = this;
}
var xItems = this.selectNodes(cXPathString, xNode);
if( xItems.length > 0 )
{
return xItems[0];
}
else
{
return null;
}
}
Element.prototype.selectSingleNode = function(cXPathString)
{
if(this.ownerDocument.selectSingleNode)
{
return this.ownerDocument.selectSingleNode(cXPathString, this);
}
else
{
throw "For XML Elements Only";
}
}
}
//Trim Property
String.prototype.trim = function() {
a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
};
function LoadXML()
{
try //Internet Explorer
{
XmlMainStories = new ActiveXObject("MSXML.DOMDocument")
XmlMainStories.loadXML(StrXml);
}
catch(e)
{
try //Firefox, Mozilla, Opera, etc.
{
parser=new DOMParser();
XmlMainStories=parser.parseFromString(StrXml,"text/xml");
}
catch(e)
{
alert(e.message)
}
}
}
function DoMainStoriesThird()
{
try
{
var HTMLResult=''
var SwitchTab=0

if (SwitchTab!=null)
{
ScrollingMainTap(SwitchTab,1000);
}
else
{
ScrollingMainTap(0,1000);
}
}
catch(err)
{

}
}
function InitialMainThirdScrollingButtons(SelectedTap)
{
	if (document.getElementById('tblMainThirdScrolling'+ImageUpID))
	{
		if (document.getElementById('tblMainThirdScrolling'+ImageUpID).offsetHeight<=127)
		{
		document.getElementById('imgMainThirdScrollingDown'+ImageUpID).src='/english/files/2-1.png'
		document.getElementById('imgMainThirdScrollingUp'+ImageUpID).src='/english/files/1.png'
		document.getElementById('imgMainThirdScrollingDown'+ImageUpID).onclick=function (){}
		document.getElementById('imgMainThirdScrollingUp'+ImageUpID).onclick=function (){}
		document.getElementById('imgMainThirdScrollingDown'+ImageUpID).style.cursor='default'
		document.getElementById('imgMainThirdScrollingUp'+ImageUpID).style.cursor='default'
		}
		else
		{
		document.getElementById('imgMainThirdScrollingDown'+ImageUpID).src='/english/files/2-2.png'
		document.getElementById('imgMainThirdScrollingUp'+ImageUpID).src='/english/files/1.png'
		}
	}
}
function ScrollingMainTap(SelectedTap,TimeOut)
{
hideArrows(SelectedTap);


CurrentSelectedMainThird=SelectedTap


for (IThirdCount=0;IThirdCount<=6;IThirdCount++)
{
if (IThirdCount!=SelectedTap)
{
if (document.getElementById('tblHeadLinesTap'+IThirdCount))
{
if (IThirdCount!=0)
document.getElementById('tblHeadLinesTap'+IThirdCount).innerHTML=''

document.getElementById('tblHeadLinesTap'+IThirdCount).style.display='none'
}


if (document.getElementById('tdSwitchMainThirdTab'+IThirdCount))
{
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className=''
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).style.color='#004791'
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).style.cursor='pointer'
}
}
else
{
if (document.getElementById('tdSwitchMainThirdTab'+IThirdCount))
{
if (IThirdCount==2)
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className='tabBg'
else if (IThirdCount==1)
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className='ChanneltabBg'
else if (IThirdCount==5)
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className='HumanRightstabBg'
else if (IThirdCount==6)
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className='ChanneltabBg'
else
document.getElementById('tdSwitchMainThirdTab'+IThirdCount).className='newsTabBg'

document.getElementById('tdSwitchMainThirdTab'+IThirdCount).style.cursor='default'
}
}
}
if (document.getElementById('tblHeadLinesTap'+SelectedTap))
document.getElementById('tblHeadLinesTap'+SelectedTap).style.display=''
if (SelectedTap!=0)
document.getElementById('imgLoadingTabs').style.display=''
}

function hideArrows(SelectedTapIndex)
{
if(SelectedTapIndex == 0)
{
document.getElementById("tabSep0").style.display='none';
document.getElementById("tabSep1").style.display='';
document.getElementById("tabSep2").style.display='';
document.getElementById("tabSep3").style.display='';
document.getElementById("tabSep4").style.display='';
document.getElementById("tabSep5").style.display='';
}
else if(SelectedTapIndex == 1)
{
document.getElementById("tabSep0").style.display='none';
document.getElementById("tabSep1").style.display='none';
document.getElementById("tabSep2").style.display='';
document.getElementById("tabSep3").style.display='';
document.getElementById("tabSep4").style.display='';
document.getElementById("tabSep5").style.display='';
}
else if(SelectedTapIndex == 2)
{
document.getElementById("tabSep0").style.display='';
document.getElementById("tabSep1").style.display='none';
document.getElementById("tabSep2").style.display='none';
document.getElementById("tabSep3").style.display='';
document.getElementById("tabSep4").style.display='';
document.getElementById("tabSep5").style.display='';
}
else if(SelectedTapIndex == 3)
{
document.getElementById("tabSep0").style.display='';
document.getElementById("tabSep1").style.display='';
document.getElementById("tabSep2").style.display='none';
document.getElementById("tabSep3").style.display='none';
	if (document.getElementById("tdSwitchMainThirdTabSeperate3").style.display=='')
	{
		document.getElementById("tabSep4").style.display='';
	}
	else
	{
		document.getElementById("tabSep4").style.display='none';
	}
document.getElementById("tabSep5").style.display='';
}
else if(SelectedTapIndex == 4)
{
document.getElementById("tabSep0").style.display='';
document.getElementById("tabSep1").style.display='';
document.getElementById("tabSep2").style.display='';
document.getElementById("tabSep3").style.display='none';
document.getElementById("tabSep4").style.display='none';
document.getElementById("tabSep5").style.display='';
}
else if(SelectedTapIndex == 5)
{
document.getElementById("tabSep0").style.display='';
document.getElementById("tabSep1").style.display='';
document.getElementById("tabSep2").style.display='';
document.getElementById("tabSep3").style.display='';
document.getElementById("tabSep4").style.display='none';
document.getElementById("tabSep5").style.display='none';
}
else if(SelectedTapIndex == 6)
{
document.getElementById("tabSep0").style.display='';
document.getElementById("tabSep1").style.display='';
document.getElementById("tabSep2").style.display='';
document.getElementById("tabSep3").style.display='';
document.getElementById("tabSep4").style.display='';
document.getElementById("tabSep5").style.display='none';
}
}

function ScrollingNewsCenterUp(Obj)
{
ScrollingNewsCenterUpTimer(Obj,Math.abs(eval(Math.round(document.getElementById('tblHeadLinesTap'+CurrentSelectedMainThird).offsetHeight/document.getElementById('tblHeadLinesTap'+CurrentSelectedMainThird).getElementsByTagName('tr').length))-document.getElementById(Obj).scrollTop+20),document.getElementById(Obj).scrollTop)
}
function ScrollingNewsCenterUpTimer(Obj,YSize,StartSize)
{
if (StartSize>=YSize)
{
document.getElementById(Obj).scrollTop=StartSize
window.setTimeout("ScrollingNewsCenterUpTimer('"+Obj+"',"+YSize+","+eval(eval(StartSize)-eval(1))+")",10)
document.getElementById('imgMainThirdScrollingDown'+ImageUpID).src='/english/files/2-2.png';
document.getElementById('imgMainThirdScrollingDown'+ImageUpID).style.cursor='pointer'
}
else if (YSize>StartSize+1)
{
document.getElementById(Obj).scrollTop=0
document.getElementById('imgMainThirdScrollingUp'+ImageUpID).src='/english/files/1.png';
document.getElementById('imgMainThirdScrollingUp'+ImageUpID).style.cursor='default'
}
}
function ScrollingNewsCenterDown(Obj)
{

ScrollingNewsCenterDownTimer(Obj,eval(document.getElementById('tblHeadLinesTap'+CurrentSelectedMainThird).offsetHeight/document.getElementById('tblHeadLinesTap'+CurrentSelectedMainThird).getElementsByTagName('tr').length)+document.getElementById(Obj).scrollTop+20,document.getElementById(Obj).scrollTop)
}
function ScrollingNewsCenterDownTimer(Obj,YSize,StartSize)
{
if (StartSize<=YSize)
{
document.getElementById(Obj).scrollTop=StartSize
window.setTimeout("ScrollingNewsCenterDownTimer('"+Obj+"',"+YSize+","+eval(eval(StartSize)+eval(1))+")",10)
document.getElementById('imgMainThirdScrollingUp'+ImageUpID).src='/english/files/1-2.png';
document.getElementById('imgMainThirdScrollingUp'+ImageUpID).style.cursor='pointer'
}
else if(eval(document.getElementById(Obj).scrollHeight - document.getElementById(Obj).style.height.replace('px',''))<=document.getElementById(Obj).scrollTop)
{
document.getElementById('imgMainThirdScrollingDown'+ImageUpID).src='/english/files/2-1.png';
document.getElementById('imgMainThirdScrollingDown'+ImageUpID).style.cursor='default'
}
}
function increase(Control)
{
	var ID = document.getElementById(Control).id;
	var IDs = ID.split("-");
	var sectionName = IDs[0];
	var count = 0;

	if (document.getElementById(ID).style.cursor == 'pointer')
	{
		for (var x = 1 ; x <= 5 ; x++)
		{
			if (document.getElementById(sectionName+""+x) != null)
			{
				count = x;
			}
		}

		for (var i = 1 ; i <= count ; i++)
		{
			if (document.getElementById(sectionName+""+i) != "")
			{
				document.getElementById(sectionName+"-MinusBtn").style.cursor='pointer'
				document.getElementById(sectionName+"-MinusBtn").className='enabled'

				if (document.getElementById(sectionName+""+i).style.display=='none' )
				{
					document.getElementById(sectionName+""+i).style.display='';
					setIndexCookie(sectionName , i , '10')
					break;
				}
			}
		}

		if (document.getElementById(sectionName+count).style.display=='')
		{
			document.getElementById(ID).style.cursor='default';
			document.getElementById(ID).className='disabled';
		}
	}
}
function decrease(Control)
{
	var ID = document.getElementById(Control).id;
	var IDs = ID.split("-");
	var sectionName = IDs[0];
	var count = 5;

	if (document.getElementById(ID).style.cursor == 'pointer')
	{
		for (var x = 1 ; x <= 5 ; x++)
		{
			if (document.getElementById(sectionName+""+x) != null)
			{
				count = x;
			}
		}

		for (var i = count ; i >= 2 ; i--)
		{
			if (document.getElementById(sectionName+""+i) != "")
			{
				document.getElementById(sectionName+"-PlusBtn").style.cursor='pointer'
				document.getElementById(sectionName+"-PlusBtn").className='enabled'

				if (document.getElementById(sectionName+""+i).style.display=='' )
				{
					document.getElementById(sectionName+""+i).style.display='none';
					setIndexCookie(sectionName , i-1 , '10')
					break;
				}
			}
		}

		try
		{
			if (document.getElementById(sectionName+"1").style.display=='' && document.getElementById(sectionName+"2").style.display=='none')
			{
				document.getElementById(ID).style.cursor='default';
				document.getElementById(ID).className='disabled'
			}
			else if (document.getElementById(sectionName+"1").style.display=='' && document.getElementById(sectionName+"2") == null)
			{
				document.getElementById(ID).style.cursor='default';
				document.getElementById(ID).className='disabled'
			}
		}
		catch(err)
		{
			document.getElementById(ID).style.cursor='default';
			document.getElementById(sectionName+"-MinusBtn").style.cursor='default'
		}
	}
}
function getHeadlineSection(cookies , imgID , trSectionName)
{
	var stringToSplit = cookies
	var stringToSplitArray = stringToSplit.split(",");
	for (var i = 0 ; i < stringToSplitArray.length-1 ; i++)
	{
		if(getIndexCookie(stringToSplitArray[i]) != null && getIndexCookie(stringToSplitArray[i]) != "" )
		{
			var count = getIndexCookie(stringToSplitArray[i]);
			var cookieName = stringToSplitArray[i];
			if (document.getElementById(cookieName + "1") != null)
			{
				for (var x = 1 ; x <= count ; x++)
				{
					if (document.getElementById(cookieName + x))
						document.getElementById(cookieName + x).style.display='';
				}
				for (z = x ; z <= 5 ; z++)
				{
					try
					{
						if (document.getElementById(cookieName + z))
							document.getElementById(cookieName + z).style.display='none';
					}
					catch(err)
					{
					}
				}

				if (count == "1")
				{
					if(document.getElementById(cookieName + "1").style.display=='' && document.getElementById(cookieName + "2").style.display=='none')
					{
						document.getElementById(cookieName +"-MinusBtn").style.cursor='default';
						document.getElementById(cookieName +"-MinusBtn").className='disabled'
					}
					else if(document.getElementById(cookieName + "1").style.display=='' && document.getElementById(cookieName + "2") == null)
					{
						document.getElementById(cookieName +"-MinusBtn").style.cursor='default';
						document.getElementById(cookieName +"-MinusBtn").className='disabled'
					}
				}
				else if(count == "2")
				{
					if(document.getElementById(cookieName + "2").style.display=='' && document.getElementById(cookieName + "3") == null)
					{
						document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
						document.getElementById(cookieName +"-PlusBtn").className='disabled'
					}
				}
				else if(count == "3")
				{
					if(document.getElementById(cookieName + "3").style.display=='' && document.getElementById(cookieName + "4") == null)
					{
						document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
						document.getElementById(cookieName +"-PlusBtn").className='disabled'
					}
				}
				else if(count == "4")
				{
					if(document.getElementById(cookieName + "4").style.display=='' && document.getElementById(cookieName + "5") == null)
					{
						document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
						document.getElementById(cookieName +"-PlusBtn").className='disabled'
					}
				}
				else if(count == "5")
				{
					document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
					document.getElementById(cookieName +"-PlusBtn").className='disabled'
				}
			}
		}
		else
		{
			var count = 0;
			var cookieName = stringToSplitArray[i];
			for (counter = 1 ; counter <= 5 ; counter++)
			{
				if (document.getElementById(cookieName + counter))
				{
					count = counter;
				}
			}

			if(count == 0)
			{
				if(document.getElementById(cookieName +"-MinusBtn"))
				{
					document.getElementById(cookieName +"-MinusBtn").style.cursor='default';
					document.getElementById(cookieName +"-MinusBtn").className='disabled'
				}
				if(document.getElementById(cookieName +"-PlusBtn"))
				{
					document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
					document.getElementById(cookieName +"-PlusBtn").className='disabled'
				}
			}
			else if (count == 1)
			{
				if(document.getElementById(cookieName +"-MinusBtn"))
				{
					document.getElementById(cookieName +"-MinusBtn").style.cursor='default';
					document.getElementById(cookieName +"-MinusBtn").className='disabled'
				}
				if(document.getElementById(cookieName +"-PlusBtn"))
				{
					document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
					document.getElementById(cookieName +"-PlusBtn").className='disabled'
				}
			}
			else if (count == 2 || count == 3)
			{
				if(document.getElementById(cookieName +"-PlusBtn"))
				{
					document.getElementById(cookieName +"-PlusBtn").style.cursor='default';
					document.getElementById(cookieName +"-PlusBtn").className='disabled'
				}
			}
		}
	}
	document.getElementById(trSectionName).style.display='';
	document.getElementById(imgID).src='/Portal/Images/LightVersionWeb2/whiteDash.jpg';
	document.getElementById(imgID).height = "3";
}
function redirect(Control)
{
var ID = document.getElementById(Control).id;
var IDs = ID.split(",");
var RSSPath = IDs[0];

window.location.href = '/AljazeeraRss/Rss.aspx?URL=' + RSSPath;
}
function redirectToHelp()
{
window.location.href = '/portal/Aspx/RSSHelp.aspx?RSSUrl=/AljazeeraRss/Rss.aspx%3FURL%3DRSS-portal.xml&RSSLocation=%u0627%u0644%u062C%u0632%u064A%u0631%u0629%20%u0646%u062A'
}
function OpenAudioVideoPage(url)
{
CountAreaHits('22');
window.open('/Channel/KServices/SupportPages/ShowMedia/showMedia.aspx?fileURL=' + url ,'','width=590; height=450; scrollbars=1')
}
function CountAreaHitsCustomHeadlines(id)
{
switch(id)
{
//--------------News----------------

case "Arabic":
CountAreaHits('19');
break;

case "health and medicine":
CountAreaHits('19');
break;

case "International":
CountAreaHits('19');
break;

case "miscellaneous":
CountAreaHits('19');
break;

case "Sports":
CountAreaHits('19');
break;

case "reports and analysis":
CountAreaHits('19');
break;

case "arts and culture":
CountAreaHits('19');
break;

case "press Tour":
CountAreaHits('19');
break;

//--------------Knowledgate----------------

case "Analysis":
CountAreaHits('21');
break;

case "Books":
CountAreaHits('21');
break;

case "Points of Views":
CountAreaHits('21');
break;

case "Special coverages 2008":
CountAreaHits('21');
break;

case "Classified files 2008":
CountAreaHits('21');
break;

//---------------E-business---------------

case "Economic":
CountAreaHits('20');
break;

case "EconomicIssues":
CountAreaHits('20');
break;

case "Business":
CountAreaHits('20');
break;

case "EconomicCoverage":
CountAreaHits('20');
break;

case "EconomicReports":
CountAreaHits('20');
break;

//--------------Channels----------------

case "News Bulletins":
CountAreaHits('22');
break;

case "Reports":
CountAreaHits('22');
break;

case "Programs":
CountAreaHits('22');
break;

//--------------Studies----------------

case "bibliography":
CountAreaHits('23');
break;

case "Seminar And Conferences":
CountAreaHits('23');
break;

case "Strategy reports":
CountAreaHits('23');
break;

case "SpecialFiles":
CountAreaHits('23');
break;

case "Discussions":
CountAreaHits('23');
break;

case "CenterNews":
CountAreaHits('23');
break;

case "MiddleForum":
CountAreaHits('23');
break;
}
}
function getIndexCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start != -1)
{
c_start = c_start + c_name.length+1;
c_end = document.cookie.indexOf(";" , c_start);
if (c_end == -1)
c_end = document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function setIndexCookie(c_name,value,expiredays)
{
if (expiredays)
{
var date = new Date();
date.setTime(date.getTime()+(expiredays));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = c_name +"=" + value +expires+"; Path=/";
}
function checkIndexCookie(c_name)
{
sectionCookie = getIndexCookie(c_name);
if (sectionCookie != null && sectionCookie != "")
{
return sectionCookie;
}
else
{
return "3";
}
}
var TimerLeftServices
function SwitchLeftCenterServices(Obj,SelectedNum)
{
for (I=1;I<=5;I++)
{
if (SelectedNum==I)
{
if (document.getElementById('tblleftservices'+I).style.display=='' && document.getElementById('imgleftservices'+I).src.toLocaleLowerCase().indexOf(('LeftServicesSelected'+I+'.jpg').toLocaleLowerCase())!=-1)
{
document.getElementById('imgleftservices'+I).src='/Portal/images/LightVersionWeb2/LeftServices'+I+'.jpg'
document.getElementById('tblleftservices'+I).style.display='none'
HeightLeftDivUp('divLeftCenterServices',document.getElementById('divLeftCenterServices').style.height.replace('px',''),1)
}
else
{
document.getElementById('imgleftservices'+I).src='/Portal/images/LightVersionWeb2/LeftServicesSelected'+I+'.jpg'
document.getElementById('tblleftservices'+I).style.display=''
HeightLeftDivServices('divLeftCenterServices',document.getElementById('tblleftservices'+I).offsetHeight)
}
}
else
{
document.getElementById('imgleftservices'+I).src='/Portal/images/LightVersionWeb2/LeftServices'+I+'.jpg'
document.getElementById('tblleftservices'+I).style.display='none'
}
}
}
function HeightLeftDivServices(Obj,Height)
{
if (TimerLeftServices!=null)
window.clearTimeout(TimerLeftServices)

if (Height>document.getElementById('divLeftCenterServices').style.height.replace('px',''))
{
HeightLeftDivDown('divLeftCenterServices',document.getElementById('divLeftCenterServices').style.height.replace('px',''),Height)
}
else if(document.getElementById('divLeftCenterServices').style.height.replace('px','')>Height)
{
HeightLeftDivUp('divLeftCenterServices',document.getElementById('divLeftCenterServices').style.height.replace('px',''),Height)
}
}
function HeightLeftDivDown(Obj,StartHeight,EndHeight)
{
if (document.getElementById(Obj).style.height.replace('px','')<EndHeight)
{
if (eval(StartHeight)>eval(EndHeight))
{
StartHeight=EndHeight
}
document.getElementById(Obj).style.height=StartHeight+'px'
TimerLeftServices=window.setTimeout("HeightLeftDivDown('"+Obj+"',"+eval(eval(StartHeight)+30)+","+EndHeight+")",1)
}
}
function HeightLeftDivUp(Obj,StartHeight,EndHeight)
{
if (document.getElementById(Obj).style.height.replace('px','')>EndHeight)
{
if (eval(StartHeight)<eval(EndHeight))
{
StartHeight=EndHeight
}
document.getElementById(Obj).style.height=StartHeight+'px'
TimerLeftServices=window.setTimeout("HeightLeftDivUp('"+Obj+"',"+eval(StartHeight-30)+","+EndHeight+")",1)
}
}
function getElementTop2(Elem)
{
try
{
yPos = Elem.offsetTop;
tempEl = Elem.offsetParent;
while (tempEl != null)
{
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
}
catch(e)
{}
return yPos;
}
function getElementLeft2(Elem)
{
try
{
xPos = Elem.offsetLeft;
tempEl = Elem.offsetParent;
while (tempEl != null)
{
xPos += tempEl.offsetLeft;
tempEl = tempEl.offsetParent;
}
}
catch(e)
{}
return xPos;
}
function showToolTip1DivScrollingThird(e , headline , publishdate , body)
{
var headline = headline;
var publishdate = publishdate;
var body = body;
var obj = document.getElementById('bubble_tooltip');
obj.style.display='';
var obj2 = document.getElementById('tooltipBoldTxt');
obj2.innerHTML = headline;
var obj3 = document.getElementById('tooltipDateTxt');
obj3.innerHTML = publishdate;
var obj4 = document.getElementById('tooltipBodyTxt');
obj4.innerHTML = body;
var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
obj.style.left = eval(eval(getElementLeft2(e)-100)) + 'px';
obj.style.top = getElementTop2(e)-obj.offsetHeight - document.getElementById('divMainThirdWeb2'+ImageUpID).scrollTop + 'px';
}
function showToolTip1DivScrollingSubStories(e , headline , publishdate , body)
{
var headline = headline;
var publishdate = publishdate;
var body = body;
var obj = document.getElementById('bubble_tooltip');
obj.style.display='';
var obj2 = document.getElementById('tooltipBoldTxt');
obj2.innerHTML = headline;
var obj3 = document.getElementById('tooltipDateTxt');
obj3.innerHTML = publishdate;
var obj4 = document.getElementById('tooltipBodyTxt');
obj4.innerHTML = body;
var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
obj.style.left = eval(eval(getElementLeft2(e)-215)) + 'px';
obj.style.top = getElementTop2(e)-obj.offsetHeight + 10 + 'px';
}
function hideToolTip1()
{
document.getElementById('bubble_tooltip').style.display = 'none';
}
function getParentWidth(e)
{
return e.offsetWidth
}