Ext.namespace('Ext.personalization');
Ext.personalization.locations = [
['0', 'London'],
['1', 'Milton Keynes']
];
Ext.personalization.keywords = [
['0', 'ASP.NET'],
['1', 'SQL']
];

var latHome = 53;
var longHome = -1.13;
var iMemberID = -1;
var iMemberType = 0;
var iSearchMemberType = 0;




     
function page_resize(){
            
     /*  Dev:    James Pearson
        Date:   2007-08-13
        Desc:   Resizes the main content area when the window is resized. 
                Partially based on the sample on http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/ */
            
    // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    if (typeof window.innerWidth != 'undefined')
    {
        viewportwidth = window.innerWidth,
        viewportheight = window.innerHeight
    }
    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
     else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
    {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
        }
       
    // older versions of IE
        
    else
    {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
    }
    
    var divPrimary = $('primary');
    var iHeightMod = 140;

    if(divPrimary){
        divPrimary.style.height = (viewportheight - iHeightMod) + 'px';
    }
	 
	var mapdiv = $('map');
	var container = $('map-container');

	if ((typeof map != 'undefined') && (typeof container != 'undefined'))
	{
	    container.style.height = (viewportheight - iHeightMod) + 'px';
	    mapdiv.style.height = (viewportheight - iHeightMod) + 'px';

    
	    try{
		    map.checkResize();
		}catch(err){}
}
//    var mapoverlay = $('MapMovieWrapper');
   
//    if (typeof mapoverlay != 'undefined')
//    	{
//	    try{
//            mapoverlay.style.height = (viewportheight - iHeightMod) + 'px';
//        }catch(err){}
//    }
}

window.onresize = page_resize;
    
