
<!--

var browserVer=navigator.appVersion;
var browserAgent=navigator.userAgent;


var objectDef = false;

var isIMG, isCSS, isW3C, isIE4, isIE6CSS, isNN4, isMac, isOPERA;
	
function sniffIt(){

	isIMG = (document.images) ? true : false;
	
	if (isIMG){
		
		
        isCSS = (document.body && document.body.style) ? true : false;
        isW3C = (isCSS && document.getElementById) ? true : false;
        isIE4 = (isCSS && document.all) ? true : false;
		isNN4 = (document.layers) ? true : false;
		isOPERA = (navigator.userAgent.indexOf("Opera")>-1) ? true : false;
        isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
		isMac = (navigator.userAgent.indexOf("Mac")>-1) ? true : false;

			if (isNN4 || !isCSS){
				wrongBrowserAlert();
			}
		
		
	}else{
		wrongBrowserAlert();
	}
	
}

function fixNav(pixelValue){
 	if (isIE && isMac){
 		  theNav = getObject('navbar');
		  theNav.currentStyle.top = pixelValue;
 	}
}

window.onload = sniffIt; 

function ieQuickCheck(){
	
	//alert (browserVer+", "+browserAgent);
	
	if (browserAgent.indexOf("Opera")>-1 || browserAgent.indexOf("Mac")>-1){return false;}
	
	if (browserVer.indexOf("MSIE 5")>-1 || browserVer.indexOf("MSIE 6")>-1 || browserVer.indexOf("MSIE 7")>-1 || browserVer.indexOf("MSIE 8")>-1){
	return true;
	} else {
	return false;
	}
}

function iePageTools(){

	if (ieQuickCheck){
		var thisObj = getRawObject("ieOnlyContent");
		thisObj.innerHTML = '<a href="javascript:makeFavourite()"><img src="images/tool-bookmark.gif" width="27" height="32" border="0" align="absmiddle" alt="Bookmark this page" />Bookmark this page</a><br />';
	}

}

function doAlert(){
	alert("isCSS="+isCSS+", isW3C="+isW3C+", isIE4="+isIE4+", isNN4="+isNN4+", isIE6CSS="+isIE6CSS+", isMac="+isMac);
}

function wrongBrowserAlert(){
alert("This is best viewed on one of these browsers\R\N IE5+,Netscape7+,Opera7+,Mozilla Firefox1+\R\NGo to our downloads page in the about us section\R\N to download the latest versions.");
	}


	function maxWindow(){

		window.moveTo(0,0);

		if (document.all){
		
			top.window.resizeTo(screen.availWidth,screen.availHeight);
			
		}else if (document.layers||document.getElementById){

			if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
			
				top.window.outerHeight = screen.availHeight;
				top.window.outerWidth = screen.availWidth;
			}
		}
	}


function fourdigits(number)	{
return (number < 1000) ? number + 1900 : number;
}

function doTheDate(){
// Get today's current date.
var now = new Date();
// LIST OF DAYS
var days = new Array('Sunday,','Monday,','Tuesday,','Wednesday,','Thursday,','Friday,','Saturday,');
// LIST OF MONTHS
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// WORK OUT THE DATE
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.

// DAY & DATE IN UK FORMAT
today =  days[now.getDay()] + " " +
date + " " +
months[now.getMonth()] + " " +
(fourdigits(now.getYear())) ;
// PRINT OUT THE DATA
document.write("" +today+ "");
}


function printPage(){
	top.print();
	}

function makeHome(){
	
		if (bw.ie){
			oHomePage.setHomePage('http://www.grimsbytowncentre.co.uk');
			returnValue = false;
		}
	}
	
function makeFavourite(){

	window.external.addfavorite('http://www.grimsbytowncentre.co.uk','Grimsby Town Centre Forum - Blurb')

	}

// Convert object name string or object reference
// into a valid element object reference
function getRawObject(obj) {
    var theObj;
    if (typeof obj == "string") {
        if (isW3C) {
            theObj = document.getElementById(obj);
        } else if (isIE4) {
            theObj = document.all(obj);
        } else if (isNN4) {
            theObj = seekLayer(document, obj);
        }
    } else {
        // pass through object reference
        theObj = obj;
    }
    return theObj;
}

// Convert object name string or object reference
// into a valid style (or NN4 layer) reference
function getObject(obj) {
    var theObj = getRawObject(obj);
    if (theObj && isCSS) {
        theObj = theObj.style;
    }
    return theObj;
}

// Set the visibility of an object to visible
function show(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.visibility = "visible";
    }
}

// Set the visibility of an object to hidden
function hide(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.visibility = "hidden";
    }
}

// Retrieve the x coordinate of a positionable object
function getObjectLeft(obj)  {
    var elem = getRawObject(obj);
    var result = 0;
    if (document.defaultView) {
        var style = document.defaultView;
        var cssDecl = style.getComputedStyle(elem, "");
        result = cssDecl.getPropertyValue("left");
    } else if (elem.currentStyle) {
        result = elem.currentStyle.left;
    } else if (elem.style) {
        result = elem.style.left;
    } else if (isNN4) {
        result = elem.left;
    }
    return parseInt(result);
}

// Retrieve the y coordinate of a positionable object
function getObjectTop(obj)  {
    var elem = getRawObject(obj);
    var result = 0;
    if (document.defaultView) {
        var style = document.defaultView;
        var cssDecl = style.getComputedStyle(elem, "");
        result = cssDecl.getPropertyValue("top");
    } else if (elem.currentStyle) {
        result = elem.currentStyle.top;
    } else if (elem.style) {
        result = elem.style.top;
    } else if (isNN4) {
        result = elem.top;
    }
    return parseInt(result);
}

// Uses display none to hide inline popup boxes
function showHide(obj){

	theObj = getObject(obj);
	
	if (theObj.display == "none"){theObj.display = "block"}
	else {theObj.display = "none"}

}


function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myWidth;
}

var newwin;

function extraWins(uRL,windowName,windowWidth,windowHeight,reSizeable,scroll,fullscreen){
	var addMe;
	newwin = window.open(uRL, windowName ,'toolbar=no, scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=yes,resizable='+reSizeable+',width='+windowWidth+',height='+windowHeight+',fullscreen='+fullscreen);
	if (newwin) {newwin.focus()};
	}	
	
function closeDown(){
	self.close()
	}
	
function popup(imgNo){
	imgPath = "images/main/gallery"+imgNo+".jpg";
	extraWins(imgPath,"galleryPopup",400,400,'yes','yes','no');
}	


function selectChecker(whichSelect){

	var selectPath = document.getElementById(whichSelect);
	var newLocation = selectPath.options[selectPath.selectedIndex].value;
	extraWins(newLocation,"selectNavWindow",780,400,'yes','yes','no');

}	

//-->

