/* Copyright 2005 BGT Partners (www.bgtpartners.com)
v1.3

This .js file creates/appends a premium content cookie
for Avaya web visitors.  If the "name" in the link the
user clicked is found in the cookie, the user does not
need to register for premium content and is forwarded
to the content.  Otherwise, the user must register.

The following two lines MUST appear in the html page
serving the premium content links, preferably near the
top of the page:

	<script language="javascript" src="/javascript/avaya_premiumurls.js" type="text/javascript"></script>
	<script language="javascript" src="/javascript/avaya_checkpremcookie.js" type="text/javascript"></script>

Links to premium content should be coded as such:

	<a href="javascript: checkCookie ('name','urlcode')">

Note that both parameters are passed as strings.  New
premium content links must be given a unique name for
the set of content users are privy to upon registration.
A unique code must also be provided for the link in this
.js file below.

The following names are currently selectable:

Name:			URLcode(s):
-----------		-------------
premium			1,2,11
accela			3-10


****NOTE that pieces of premium content linked to from the www.avaya.com homepage
or other locations where there is no 'cid' variable in the querystring must
include the 'cid' in the querystring of the premium content link below.
*/

//Accomodate staging environment
var staging = unescape(self.location).indexOf('intact.avaya.com');
if (staging == -1)
		{var formPage = "http://www1.avaya.com/forms/premcontent/index.html";}
else 	{var formPage = "http://intact.avaya.com:9094/forms/premcontent/index.html";}

function getURL(urlcode) {

	switch (urlcode) {
		case '1':  return 'http://www1.avaya.com/enterprise/whitepapers/pc/idc_eb328.pdf?cid=AVPC3'; break;
		case '2':  return 'http://www1.avaya.com/enterprise/whitepapers/pc/avaya-branch.pdf?cid=AVPC2'; break;
		case '3':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_1&Context=START'; break;
		case '4':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_2&Context=START'; break;
		case '5':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_3&Context=START'; break;
		case '6':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_4&Context=START'; break;
		case '7':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_5&Context=START'; break;
		case '8':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_6&Context=START'; break;
		case '9':  return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_7&Context=START'; break;
		case '10': return 'http://reg.itworld.com/servlet/Frs.frs?Script=avaya_catcher_8&Context=START'; break;
		case '11': return 'http://www1.avaya.com/enterprise/whitepapers/pc/Corbett_whitepaper_v2.pdf'; break;
	}
}

