//variable to hold ref to current pagevar crnt_page_ref;var col_scheme_ref = 0;//function to deal with main nav clicksfunction mainNavClick(nav_item_ref){	if (nav_item_ref != crnt_page_ref) document.location.href = nav_item_ref+'.asp?col_scheme_ref='+col_scheme_ref;}//function to deal with catalogue left nav clicksfunction loadPage(filmId){	document.location.href='catalogue.asp?filmId='+filmId+'&col_scheme_ref='+col_scheme_ref;}function showNews(news_id){	document.location.href='News.asp?news_id='+news_id+'&col_scheme_ref='+col_scheme_ref;}// Manipulate the colour of CSS classes// init:	initialise using buildRuleObjects() function, //			passing comma separated list of CSS class names to be modified//funct:	use cssToggle() function to change specified CSS class names//			passing #RRGGBB valuevar cssToggleInitialised 	= false;var ruleSearchList 			= new Array();var rule_obj 				= new Object();var rulesObjName;var inputListAlias;// constructorfunction ruleContent_obj() {	this.className;	this.rulePos;	this.ruleFound = false;}// create alias namesfunction createAlias(input) {	input = input.replace(/[\*]/g,"");	input = input.replace(/[#]/g,"hash");	input = input.replace(/[\.]/g,"dot");	input = input.replace(/[\s]/g,"space");	input = input.replace(/[\:]/g,"colon");	input = input.toLowerCase()	return input}function normalise(input) {}// create objects bases on ruleSearchList with cssRule index as propertiesfunction buildRuleObjects(inputList) {var count, ssCount , cssRuleLength, output, styleSheetLength;var scanSelectorText, localSelectorText	rulesObjName = (is_ie)?"rules":"cssRules";		if (inputList) {						//create rule alias names						inputListAlias = createAlias(inputList);						//create rule search lists						ruleSearchList = inputList.split(",");			ruleSearchListAlias = inputListAlias.split(",");						//create rule object instances			for (count=0;count < ruleSearchList.length;count++) {				eval("rule_obj." + ruleSearchListAlias[count] + " = new ruleContent_obj()");				eval("rule_obj." + ruleSearchListAlias[count] + ".className = '" + ruleSearchList[count] + "'");				//alert(rule_obj[ruleSearchListAlias[count]].className)			}						//find css rule indexes and assign to rule object instance property			styleSheetLength = document.styleSheets.length;						for (ssCount=0;ssCount<styleSheetLength;ssCount++) {				cssRuleLength = eval('document.styleSheets['+ ssCount +'].' + rulesObjName + '.length');				for (searchCount=0;searchCount<ruleSearchList.length;searchCount++) {							for (count=0;count<cssRuleLength;count++) {																localSelectorText = eval('document.styleSheets['+ ssCount +'].' + rulesObjName + '['+count+'].selectorText')							localSelectorText = localSelectorText.toLowerCase()							localSelectorText = localSelectorText.replace(/[\*]/g,"");														scanSelectorText = ruleSearchList[searchCount]							scanSelectorText = scanSelectorText.toLowerCase()																												//alert("local:" + localSelectorText + "  scan:" + scanSelectorText);							if (localSelectorText == scanSelectorText) {																rule_obj[ruleSearchListAlias[searchCount]].rulePos = count;								rule_obj[ruleSearchListAlias[searchCount]].ruleFound = true;								//alert(rule_obj[ruleSearchListAlias[searchCount]].className)							}						}				}			}						cssToggleInitialised = true;	}}//switch colours of registered style classes to inputColourfunction cssToggle(inputColour, col_ref) {	col_scheme_ref = col_ref;	var count, crntRuleObj, styleSheetLength, cssRuleLength, ssCount;var defaultStyle, modifyStyleObj	if (cssToggleInitialised) {		styleSheetLength = document.styleSheets.length;				for (ssCount=0;ssCount<styleSheetLength;ssCount++) {								cssRuleLength = eval('document.styleSheets['+ ssCount +'].' + rulesObjName + '.length');								for (count=0;count < cssRuleLength; count++) {				//status += "."										crntRuleObj = rule_obj[ruleSearchListAlias[count]];					defaultStyle = eval('document.styleSheets['+ ssCount + '].' + rulesObjName + '[' + count + '].selectorText');					defaultStyle = createAlias(defaultStyle)					//alert(defaultStyle)					modifyStyleObj = eval('rule_obj["'+ defaultStyle +'"]');										if (modifyStyleObj) {						//alert("match" + modifyStyleObj.rulePos)						eval('document.styleSheets['+ ssCount +'].'+ rulesObjName +'[' + modifyStyleObj.rulePos + '].style.color="'+ inputColour +'"')					}														}										}			}}/**************************************** Popup window functions ***************************************************///page global variablesvar window_width, window_height, screen_width, screen_height, avail_width, avail_height;var pop_win_ref;//function to get page dimensionsfunction getPageDimensions() {	window_width = (is_ie) ? document.body.clientWidth : window.innerWidth;	window_height = (is_ie) ? document.body.clientHeight : window.innerHeight;		avail_width = screen.availWidth;	avail_height = screen.availHeight;		screen_width = screen.width;	screen_height = screen.height;}//function get xy (returns string for pop up propertiesfunction getWinXY (win_width,win_height) {			//get page dimensions if not already set	if (screen_width == null) getPageDimensions();		//determine x y of centered window	var xpos = Math.round(((avail_width - win_width)/2));	var ypos = Math.round(((avail_height - win_height)/2)) - ((screen_height - avail_height)/2);			//start return string	var return_string = 'width='+win_width+',height=' + win_height;		//return relevant string	if (is_nav && (is_major <=4)) return (return_string + ',screenX=' + xpos + ',screenY=' + ypos)	else return (return_string + ',left=' + xpos + ',top=' + ypos)}//futura general popup function (centres on page)function popWin (file_name,win_name,win_width,win_height,is_scroll,is_resize,config) {	//create conf_string for popup	var conf_string = getWinXY(win_width,win_height);	conf_string += (is_scroll) ? ',scrollbars=yes' : ',scrollbars=no';	conf_string += (is_resize) ? ',resizable=yes' : ',resizable=no';	if (config != null) conf_string += config;	//window.alert(conf_string);		//open window and set to focus	if (pop_win_ref && (!pop_win_ref.closed)) pop_win_ref.close();	pop_win_ref = window.open(file_name,win_name,conf_string);	pop_win_ref.focus();}//Site specific scriptsfunction launchCompetition(){	popWin('http://competition.axiomfilms.co.uk','popup',920,570,false,false,'');}