


	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

	try 
	{
		var pageTracker = _gat._getTracker("UA-9832637-1");
		pageTracker._trackPageview();
	} 
	catch(err) {}


function setInitiate()
{

	setThemeStyle();

}

function setThemeStyle()
{

	var url = "";

	url = getThemeStyleSheet();

	document.write('<link rel="stylesheet" type="text/css" href="' + url + '" />');
}

function getThemeStyleSheet()
{

	var url = "";
	var theme = getCookieTheme();

	switch(theme)
	{ 
	case "aquacyan":
  		url = "resources/stylesheet/theme/cioforum/aquacyan.css";
  		break;
	case "autumnorange":
  		url = "resources/stylesheet/theme/cioforum/autumnorange.css";
  		break;   
	case "deepblue":
  		url = "resources/stylesheet/theme/cioforum/deepblue.css";
  		break;
	case "default":
  		url = "resources/stylesheet/theme/cioforum/default.css";
  		break;
	case "fashionpink":
  		url = "resources/stylesheet/theme/cioforum/fashionpink.css";
  		break;   
	case "fieldgreen":
  		url = "resources/stylesheet/theme/cioforum/fieldgreen.css";
  		break;   
	case "forestgreen":
  		url = "resources/stylesheet/theme/cioforum/forestgreen.css";
  		break;   
	case "funpurple":
  		url = "resources/stylesheet/theme/cioforum/funpurple.css";
  		break;   
	case "monogray":
  		url = "resources/stylesheet/theme/cioforum/monogray.css";
  		break;
	case "naturallavender":
  		url = "resources/stylesheet/theme/cioforum/naturallavender.css";
  		break;   
	case "olivegreen":
  		url = "resources/stylesheet/theme/cioforum/olivegreen.css";
  		break;   
	case "sportred":
  		url = "resources/stylesheet/theme/cioforum/sportred.css";
  		break;  
	case "summeryellow":
  		url = "resources/stylesheet/theme/cioforum/summeryellow.css";
  		break;    
	case "winterblue":
  		url = "resources/stylesheet/theme/cioforum/winterblue.css";
  		break;   
	default:
  		url = "resources/stylesheet/theme/cioforum/default.css";
		break;
	} 


	return url;

}

function getCookieTheme()
{

	var theme = "";

	theme = GetCookie('ForumHomeTheme');

	if (theme == "") {theme = "default";}

	return theme;

}



function getSelectTheme(theme)
{

	var expdate = new Date ();

	expdate.setTime (expdate.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30 days from now 

	SetCookie("ForumHomeTheme", theme, expdate);

	window.location.reload(false);

}


function getSelectPhotoStory(mycommand)
{

	var expdate = new Date ();
        var photostory = 1;
        var command = mycommand;

	var photostory = getCookiePhotoStory();

	expdate.setTime (expdate.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30 days from now 

	if (command == "First") {photostory = 1;}
	if (command == "Previous") {photostory = photostory - 1;}
	if (command == "Next") {photostory = ++photostory;}
	if (command == "Last") {photostory = 27;}

	if (photostory < 1) {photostory = 1;}
	if (photostory > 27) {photostory = 27;}

	if (photostory == 1) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory01.png";}
	if (photostory == 2) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory02.png";}
	if (photostory == 3) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory03.png";}
	if (photostory == 4) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory04.png";}
	if (photostory == 5) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory05.png";}
	if (photostory == 6) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory06.png";}
	if (photostory == 7) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory07.png";}
	if (photostory == 8) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory08.png";}
	if (photostory == 9) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory09.png";}	
	if (photostory == 10) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory10.png";}	
	if (photostory == 11) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory11.png";}	
	if (photostory == 12) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory12.png";}	
	if (photostory == 13) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory13.png";}	
	if (photostory == 14) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory14.png";}
	if (photostory == 15) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory15.png";}	
	if (photostory == 16) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory16.png";}	
	if (photostory == 17) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory17.png";}	
	if (photostory == 18) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory18.png";}	
	if (photostory == 19) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory19.png";}
	if (photostory == 20) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory20.png";}	
	if (photostory == 21) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory21.png";}	
	if (photostory == 22) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory22.png";}
	if (photostory == 23) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory23.png";}	
	if (photostory == 24) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory24.png";}
	if (photostory == 25) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory25.png";}	
	if (photostory == 26) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory26.png";}	
	if (photostory == 27) {document.imgPhotoStory.src="media/gallery/cioforum/photostory/photostory27.png";}

	SetCookie ("PhotoStory", photostory, expdate);

}

function getCookiePhotoStory()
{

	var photostory = 1;

	photostory = GetCookie('PhotoStory');

	if (photostory == "") {photostory = 1;}

	if (photostory < 1) {photostory = 1;}
	if (photostory > 27) {photostory = 27;}

	return photostory;

}


