/**
 * This file contains all the javascript functions used
 * for the ET Telegraph Network dropdown list.
 */

// 14-08-2001 - Niall Johnson added global network to list
// 03-09-2001 - Niall Johnson changed classified item to announcments

// used for the Telegraph Network dropdown navigation
function newSite(sFile) {
	var nId = sFile.indexOf(";$sessionid$")
	var newUrl = ""
	var sId = ""
	var noRedirect = false

	// if cookies are not used store the session id
	if (nId != -1) {
		sId = sFile.substring(nId)
	}

	var selObject = window.document.fSite.selSite
	switch(selObject.options[selObject.selectedIndex].value) {
		case "1":
			newUrl = "http://portal.telegraph.co.uk/portal/index.jhtml" + sId
			break
		case "2":
			newUrl = "http://news.telegraph.co.uk/news/index.jhtml" + sId
			break
		case "3":
			newUrl = "http://news.telegraph.co.uk/news/main.jhtml?menuId=551&menuItemId=-1&view=SUMMARY&grid=P1" + sId
			break
		case "4":
			newUrl = "http://news.telegraph.co.uk/news/main.jhtml?menuId=552&menuItemId=-1&view=SUMMARY&grid=P1" + sId
			break
		case "5":
			newUrl = "http://sport.telegraph.co.uk/sport/index.jhtml" + sId
			break
		case "6":
			newUrl = "http://travel.telegraph.co.uk/travel/index.jhtml" + sId
			break
		case "7":
			newUrl = "http://money.telegraph.co.uk/money/index.jhtml" + sId
			break
		case "8":
			newUrl = "http://motoring.telegraph.co.uk/motoring/index.jhtml" + sId
			break
		case "9":
			newUrl = "/core/exit.jhtml" + sId + "?exit=http://jobs.telegraph.co.uk"
			break
		case "10":
			newUrl = "/core/exit.jhtml" + sId + "?exit=http://www.businessfile-online.com"
			break
		case "11":
			newUrl = "http://property.telegraph.co.uk/property/index.jhtml" + sId
			break
		case "12":
			newUrl = "http://shopping.telegraph.co.uk/shopping/index.jhtml" + sId
			break
		case "13":
			newUrl = "http://family.telegraph.co.uk/family/index.jhtml" + sId
			break
		case "14":
			newUrl = "http://fashion.telegraph.co.uk/fashion/index.jhtml" + sId
			break
		case "15":
			newUrl = "http://gardening.telegraph.co.uk/gardening/index.jhtml" + sId
			break
		case "16":
			newUrl = "http://health.telegraph.co.uk/health/index.jhtml" + sId
			break
		case "17":
			newUrl = "http://outdoors.telegraph.co.uk/outdoors/index.jhtml" + sId
			break
		case "18":
			newUrl = "http://wine.telegraph.co.uk/wine/index.jhtml" + sId
			break
		case "19":
			newUrl = "http://weather.telegraph.co.uk/weather/index.jhtml" + sId
			break
		case "20":
			newUrl = "http://www.telegraph.co.uk/et?pg=/ixfeedb.html"
			break
		case "21":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/etchome.html"
			break
		case "22":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/ixreview.html"
			break
		case "23":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/ixgall.html"
			break
		case "24":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/iecon.html"
			break
		case "25":
			newUrl = "/core/exit.jhtml" + sId + "?exit=http://www.booksonline.co.uk/booksol?ac=004864407344811&rtmo=gjSlkfnu&atmo=gjSlkfnu&pg=/ixbfront.html"
			break
		case "26":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/iehoro.html"
			break
		case "27":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/iefedu.html"
			break
		case "28":
			newUrl = "http://www.telegraph.co.uk/et?pg=/redirects/juiced.html"
			break
		case "29":
			newUrl = "http://www.telegraph.co.uk/et?pg=/t2online/ixttwo.html"
			break
		case "30":
			newUrl = "http://www.dailytelegraph.co.uk/dt?pg=/ixdfront.html"
			break
		case "31":
			newUrl = "http://www.telegraph.co.uk/et?pg=/etc/ieobit.html"
			break
		case "32":
			newUrl = "http://www.telegraph.co.uk/et?pg=/classad/announcements/index.html"
			break
		case "33":
			newUrl = "http://www.telegraph.co.uk/et?pg=/et/ixcross.html"
			break
		case "34":
			newUrl = "/core/Matt/pMattTemplate.jhtml" + sId + "?pPage=/money/Matt/pcMatt.jhtml&pTitle=Matt.telegraph"
			newWin = window.open(newUrl,'Matt','scrollbars,resizable,width=392,height=580')
			noRedirect = true
			break
		case "35":
			newUrl = "/money/Alex/pAlexTemplate.jhtml" + sId + "?pPage=/money/Alex/pcAlex.jhtml&pTitle=Alex.telegraph"
			newWin = window.open(newUrl,'Alex','scrollbars,resizable,width=820,height=505')
			noRedirect = true
			break
		case "36":
			newUrl = "http://www.globalnetwork.co.uk"
			break			
		default:
			noRedirect = true
		}

	if (noRedirect == false) {
		newPWin = window.open(newUrl,'nPWin','menubar,status,scrollbars,resizable,width=800,height=600,toolbar,location')
		newPWin.focus()
	}
	window.document.fSite.selSite.selectedIndex = 0
}
