//Background and Font Size Change Code...... DO NOT CHANGE

var strFont1 = '';
var strFont2 = '';
var strFont3 = '';
var strMenuButton1 = '';
var strMenuButton2 = '';
var strMenuButton3 = '';
var strMenuButton4 = '';
var strMenuButton5 = '';
var strMenuButton6 = '';
var strMenuButton7 = '';
//ROLLOVER SET
var strFont1Rollover = '';
var strFont2Rollover = '';
var strFont3Rollover = '';
var strMenuButton1Rollover = '';
var strMenuButton2Rollover = '';
var strMenuButton3Rollover = '';
var strMenuButton4Rollover = '';
var strMenuButton5Rollover = '';
var strMenuButton6Rollover = '';
var strMenuButton7Rollover = '';

function fnCheckCookie()
{
	var strText = '';
	var strArray;
	var strTemp = '';
	var strColour = '';
	var strFont = '';
	var date = new Date();
	var intX = 0;


	if (document.cookie == ''){
		/*date.setTime(date.getTime()+(90*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();	
		document.cookie = 'color=1' + expires + '; path=/';
		document.cookie = 'font=2' + expires + '; ; path=/';*/
		//alert('no cookie');
	}
	else{
		//alert('a cookie');
		strArray = document.cookie.split(';');
		
		while (intX < strArray.length){
			strTemp = strArray[intX];
			
			while (strTemp.charAt(0)==' '){
				strTemp = strTemp.substring(1, strTemp.length);
			}
			
			if (strTemp.substring(0, 4) == 'font'){
				strFont = strTemp.substring(5, strTemp.length);
			}
			
			if (strTemp.substring(0, 5) == 'color'){
				strColour = strTemp.substring(6, strTemp.length);
			}
			
			intX = intX + 1;
		}

		fnGetId(strColour, strFont);
		
	}
}

function fnChangeColour(intColourID)
{

	//alert(document.cookie);
	var date = new Date();
	date.setTime(date.getTime()+(90*24*60*60*1000));
	//var expires = "; 
        //expires="+date.toGMTString();	
	var expires = '; expires=Monday, 04-Apr-2020 05:00:00 GMT';
	document.cookie = 'color=' + intColourID + expires;
	fnCheckCookie();
}

function fnChangeText(intColourID)
{
	//alert(document.cookie);
	var date = new Date();
	date.setTime(date.getTime()+(90*24*60*60*1000));
	var expires = '; expires=Monday, 04-Apr-2020 05:00:00 GMT';
	//var expires = "; expires="+date.toGMTString();	
	document.cookie = 'font=' + intColourID + expires;
	fnCheckCookie();
}

function fnGetId(intChoice, intChoiceB){
   // Returns the first DIV element in the collection.

   var strText = '';

     switch (intChoice)
     {
       case '1':
	     strText = '#FFFFFF';
		 break
       case '2':
	     strText = '#baedff';
		 break
       case '3':
	     strText = '#ffffae';
		 break
       case '4':
	     strText = '#fef668';
		 break	 		 		 
     }
   

     document.getElementById('divContainer').style.background=strText;
	 
     switch (intChoiceB)
     {
       case '1':
	     strText = '14px';
		 break
       case '2':
	     strText = '18px';
		 break
       case '3':
	     strText = '22px';
		 break	 		 		 
     }

     document.getElementById('Fontsize').style.fontSize=strText;
}

function overImage(strID){
	var strSource = '';

	switch (strID)
	{
		case 'font1':
			strSource = strFont1Rollover;
			break;
		case 'font2':
			strSource = strFont2Rollover;
			break;
		case 'font3':
			strSource = strFont3Rollover;			
			break;
		case 'MenuButton1':
			strSource = strMenuButton1Rollover;			
			break;
		case 'MenuButton2':
			strSource = strMenuButton2Rollover;			
			break;	
		case 'MenuButton3':
			strSource = strMenuButton3Rollover;			
			break;
		case 'MenuButton4':
			strSource = strMenuButton4Rollover;			
			break;
		case 'MenuButton5':
			strSource = strMenuButton5Rollover;			
			break;
		case 'MenuButton6':
			strSource = strMenuButton6Rollover;			
			break;
		case 'MenuButton7':
			strSource = strMenuButton7Rollover;			
			break;
	}

		
	document.getElementById(strID).src = strSource;
}

function resetImage(strID){
	var strSource = '';
	
	switch (strID)
	{
		case 'font1':
			strSource = strFont1;
			break;
		case 'font2':
			strSource = strFont2;
			break;
		case 'font3':
			strSource = strFont3;			
			break;
		case 'MenuButton1':
			strSource = strMenuButton1;			
			break;
		case 'MenuButton2':
			strSource = strMenuButton2;			
			break;	
		case 'MenuButton3':
			strSource = strMenuButton3;			
			break;
		case 'MenuButton4':
			strSource = strMenuButton4;			
			break;
		case 'MenuButton5':
			strSource = strMenuButton5;			
			break;
		case 'MenuButton6':
			strSource = strMenuButton6;			
			break;
		case 'MenuButton7':
			strSource = strMenuButton7;			
			break;
	}
	

	document.getElementById(strID).src = strSource;
}
