/*
* **************************************************************************
lp.js
Interactive Local Plan
Colchester
Ver 2.0
08/04
****************************************************************************
*/

//*********************GLOBALS

// Insert output from 'navrray.txt' below
//Set up the array for required info about each inset maps.
//Map name,origin X of overview inset frame,origin Y of overview inset frame,width of overview inset frame,blx of map grid,bly of map grid,trx of map grid,try of map grid,Grid Size,Grid Overlap,no. of rows,no. of cols
var theinsetsmaps = new Array (56)
theinsetsmaps[0] = new Array("inset_19",606165,215020,611.109,606000,215000,606850,215550,250,100,3,5)
theinsetsmaps[1] = new Array("inset_42",594636,213318,791.911,594500,213250,595500,214100,250,100,5,6)
theinsetsmaps[2] = new Array("inset_29",596434,214751,662.263,596500,214750,597050,215450,250,100,4,3)
theinsetsmaps[3] = new Array("inset_41",598433,216077,1181.56,598000,216000,599700,217300,500,100,3,4)
theinsetsmaps[4] = new Array("inset_01",600042,218121,1413.07,600000,218000,601300,219700,500,100,4,3)
theinsetsmaps[5] = new Array("inset_23",601861,219269,926.498,602000,219250,602700,220250,250,100,6,4)
theinsetsmaps[6] = new Array("inset_22",602686,220066,635.98,602500,220000,603350,220700,250,100,4,5)
theinsetsmaps[7] = new Array("inset_24",603438,220358,787.413,603250,220250,604250,221100,250,100,5,6)
theinsetsmaps[8] = new Array("inset_33",596441,219388,1854.23,596000,219500,598500,221200,500,100,4,6)
theinsetsmaps[9] = new Array("inset_32",594147,217944,662.351,594250,217750,594800,218750,250,100,6,3)
theinsetsmaps[10] = new Array("inset_04",593677,218512,1268.17,593500,218500,595200,219800,500,100,3,4)
theinsetsmaps[11] = new Array("inset_06",593990,219679,653.531,594000,219500,594550,220350,250,100,5,3)
theinsetsmaps[12] = new Array("inset_05",592802,220365,659.088,592750,220250,593600,220950,250,100,4,5)
theinsetsmaps[13] = new Array("inset_34",591639,218089,644.624,591500,218000,592200,218850,250,100,5,4)
theinsetsmaps[14] = new Array("inset_39",589337,218518,692.426,589250,218500,589950,219350,250,100,5,4)
theinsetsmaps[15] = new Array("inset_18",590988,221146,624.603,591000,221000,591550,221850,250,100,5,3)
theinsetsmaps[16] = new Array("inset_12",592534,222352,645.506,592500,222250,593200,222950,250,100,4,4)
theinsetsmaps[17] = new Array("inset_13",592360,222934,1481.51,592000,222500,594100,224600,500,100,5,5)
theinsetsmaps[18] = new Array("inset_38",591203,223142,1412.9,591000,223000,592700,224700,500,100,4,4)
theinsetsmaps[19] = new Array("inset_37",589667,222647,1734.72,589500,222500,591600,224200,500,100,4,5)
theinsetsmaps[20] = new Array("inset_36",588724,223209,644.094,588750,223000,589300,224000,250,100,6,3)
theinsetsmaps[21] = new Array("inset_28",588427,225360,1299.21,588500,225000,589800,226700,500,100,4,3)
theinsetsmaps[22] = new Array("inset_02",591425,225431,700.275,591500,225250,592050,226250,250,100,6,3)
theinsetsmaps[23] = new Array("inset_20",592829,225518,1392.44,593000,225500,594300,227200,500,100,4,3)
theinsetsmaps[24] = new Array("inset_03",591706,226809,683.606,591750,226750,592300,227600,250,100,5,3)
theinsetsmaps[25] = new Array("inset_10",588866,227029,657.236,588750,227000,589450,227700,250,100,4,4)
theinsetsmaps[26] = new Array("inset_11",588867,227774,1397.82,588500,228000,590600,229300,500,100,3,5)
theinsetsmaps[27] = new Array("inset_25",592238,228105,1357.16,592000,228000,593700,229700,500,100,4,4)
theinsetsmaps[28] = new Array("inset_46",592645,231332,1341.99,592500,231000,593800,232700,500,100,4,3)
theinsetsmaps[29] = new Array("inset_43",589155,230509,671.347,589000,230500,589850,231200,250,100,4,5)
theinsetsmaps[30] = new Array("inset_44",589018,229895,665.702,589000,229750,589700,230600,250,100,5,4)
theinsetsmaps[31] = new Array("inset_45",595290,226749,1968.97,595500,226500,597200,229000,500,100,6,4)
theinsetsmaps[32] = new Array("inset_27",597245,228630,1282.54,597000,228500,598700,229800,500,100,3,4)
theinsetsmaps[33] = new Array("inset_26",597348,230043,821.985,597250,230000,598100,231000,250,100,6,5)
theinsetsmaps[34] = new Array("inset_35",595741,231666,666.584,595750,231500,596450,232350,250,100,5,4)
theinsetsmaps[35] = new Array("inset_09",599098,231610,656.089,599000,231500,599700,232350,250,100,5,4)
theinsetsmaps[36] = new Array("inset_07",599498,231255,1711.62,599500,231000,601200,233100,500,100,5,4)
theinsetsmaps[37] = new Array("inset_08",599439,232774,1329.38,599000,233000,601100,233900,500,100,2,5)
theinsetsmaps[38] = new Array("inset_31",601268,231017,1086.13,601000,231000,602700,232300,500,100,3,4)
theinsetsmaps[39] = new Array("inset_30",602366,230785,1329.55,602500,230500,603800,232200,500,100,4,3)
theinsetsmaps[40] = new Array("inset_17",604224,231180,676.11,604250,231000,604800,232000,250,100,6,3)
theinsetsmaps[41] = new Array("inset_15",605510,230971,1039.92,605500,230500,606800,232200,500,100,4,3)
theinsetsmaps[42] = new Array("inset_16",606511,231115,672.317,606500,231000,607200,231850,250,100,5,4)
theinsetsmaps[43] = new Array("inset_55",599849,211529,3145.59,599500,211500,603200,214400,500,100,7,9)
theinsetsmaps[44] = new Array("inset_47",601301,229587,636.069,601250,229500,601950,230200,250,100,4,4)
theinsetsmaps[45] = new Array("inset_50",592971,229979,692.426,593000,229750,593550,230750,250,100,6,3)
theinsetsmaps[46] = new Array("inset_49",602947,212809,692.426,603000,212750,603550,213600,250,100,5,3)
theinsetsmaps[47] = new Array("inset_48",588892,224603,692.426,589000,224500,589550,225350,250,100,5,3)
theinsetsmaps[48] = new Array("inset_21",593788,225240,1374.09,594000,225000,594900,226700,500,100,4,2)
theinsetsmaps[49] = new Array("inset_54",586732,213477,4928.74,586500,214000,591800,217700,500,100,9,13)
theinsetsmaps[50] = new Array("inset_53",599832,222616,2802.47,599500,222500,602800,225400,500,100,7,8)
theinsetsmaps[51] = new Array("inset_52",598488,224026,2888.6,598250,224250,601500,226600,250,100,15,21)
theinsetsmaps[52] = new Array("inset_14",605048,232350,1427.04,605000,232000,606300,234100,500,100,5,3)
theinsetsmaps[53] = new Array("inset_40",590266,232477,625.049,590250,232250,590950,233250,250,100,6,4)
theinsetsmaps[54] = new Array("inset_51",593529,218959,12316.5,593000,220000,606000,229800,1000,200,12,16)
theinsetsmaps[55] = new Array("proposals",584130,211000,25000,585000,211000,609500,237000,2000,500,17,16)
// ^^^^Insert output from 'navarray.txt' above ^^^^^^^^^


//*********************BROWSER CHECKING
// Ultimate client-side JavaScript client sniff. Version 3.03
// (C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
//                      also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, 
//                      correct Opera 5 detection
//                      add support for winME and win2k
//                      synch with browser-type-oo.js
// Revised 26 Mar 01 to correct Opera detection
// Revised 02 Oct 01 to add IE6 detection

// Everything you always wanted to know about your JavaScript client
// but were afraid to ask. Creates "is_" variables indicating:
// (1) browser vendor:
//     is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
// (2) browser version number:
//     is_major (integer indicating major version number: 2, 3, 4 ...)
//     is_minor (float   indicating full  version number: 2.02, 3.01, 4.04 ...)
// (3) browser vendor AND major version number
//     is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
//     is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
//     is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
// (4) JavaScript version number:
//     is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
// (5) OS platform and version:
//     is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
//     is_os2
//     is_mac, is_mac68k, is_macppc
//     is_unix
//     is_sun, is_sun4, is_sun5, is_suni86
//     is_irix, is_irix5, is_irix6
//     is_hpux, is_hpux9, is_hpux10
//     is_aix, is_aix1, is_aix2, is_aix3, is_aix4
//     is_linux, is_sco, is_unixware, is_mpras, is_reliant
//     is_dec, is_sinix, is_freebsd, is_bsd
//     is_vms
//
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
// for detailed lists of userAgent strings.
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater") 
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.

    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1); 

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

    // *** JAVASCRIPT VERSION CHECK ***
    var is_js;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if (is_opera5up) is_js = 1.3;
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_hotjava3up) is_js = 1.4;
    else if (is_nav6 || is_gecko) is_js = 1.5;
    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.
    else if (is_nav6up) is_js = 1.5;
    // NOTE: ie5up on mac is 1.4
    else if (is_ie5up) is_js = 1.3

    // HACK: no idea for other browsers; always check for JS version with > or >=
    else is_js = 0.0;

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));

    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) || 
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
               (agt.indexOf("windows 16-bit")!=-1) );  

    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));

    var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));

    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 || 
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

    var is_os2   = ((agt.indexOf("os/2")!=-1) || 
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||   
                    (agt.indexOf("ibm-webexplorer")!=-1));

    var is_mac    = (agt.indexOf("mac")!=-1);
    // hack ie5 js version for mac
    if (is_mac && is_ie5up) is_js = 1.4;
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || 
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || 
                                (agt.indexOf("powerpc")!=-1)));

    var is_sun   = (agt.indexOf("sunos")!=-1);
    var is_sun4  = (agt.indexOf("sunos 4")!=-1);
    var is_sun5  = (agt.indexOf("sunos 5")!=-1);
    var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
    var is_hpux  = (agt.indexOf("hp-ux")!=-1);
    var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
    var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
    var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
    var is_aix1  = (agt.indexOf("aix 1") !=-1);    
    var is_aix2  = (agt.indexOf("aix 2") !=-1);    
    var is_aix3  = (agt.indexOf("aix 3") !=-1);    
    var is_aix4  = (agt.indexOf("aix 4") !=-1);    
    var is_linux = (agt.indexOf("inux")!=-1);
    var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
    var is_unixware = (agt.indexOf("unix_system_v")!=-1); 
    var is_mpras    = (agt.indexOf("ncr")!=-1); 
    var is_reliant  = (agt.indexOf("reliantunix")!=-1);
    var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || 
           (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || 
           (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); 
    var is_sinix = (agt.indexOf("sinix")!=-1);
    var is_freebsd = (agt.indexOf("freebsd")!=-1);
    var is_bsd = (agt.indexOf("bsd")!=-1);
    var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || 
                 is_sco ||is_unixware || is_mpras || is_reliant || 
                 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);

    var is_vms   = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));

//***********END OF BROWSER CHECK

//*********Preload images.
function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//*********Open main map frame, called from written chapters.
function openMap(mapVal){ 
	theURL =  "../" + mapVal   		
	winName =  "map"
	features = "toolbar=yes,scrollbars=yes,resizable=yes,width=850,height=650"
	window.open(theURL,winName,features)		
}

//*********Open copyright window.
function opencopyright(theURL){   		
	winName =  "copyright"
	features = "toolbar=no,scrollbars=yes,resizable=yes,width=590,height=250"
	window.open(theURL,winName,features)		
}

//*********Jump menu (Proposals map > main map frame)
function jumpMenu(targ,selObj,restore){ 
 	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'")
  	if (restore) selObj.selectedIndex=0
}


//**********Shows the relevant map key
function showKey(){

		winName =  "KEY"				
		//Define the key to open
		var cmdString = parent.document.location.search
		
		if(cmdString.indexOf("PROPOSALS") != -1){
			theURL = "key1.htm"
			features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"		
		}
		else{
			var theSep
			for (n=0;n<  cmdString.length; n++){
				var teststring = cmdString.substring(n,(n + 1))
				if(teststring == "_"){
					theSep = n
				}
			}
			var	temp = cmdString.substring(1,theSep).toUpperCase()
			var	theMapNo = temp.substring(6,temp.length).toUpperCase()
				
			if(temp=="PROPOSALS"){
				theURL = "key1.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}					
			else if(theMapNo==52){
				theURL = "key2.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}
			else if(theMapNo==51){
				theURL = "key3.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}		
			else if(theMapNo==53){
				theURL = "key4.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}
			else if(theMapNo==54){
				theURL = "key5.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}		
			else if(theMapNo==55){
				theURL = "key6.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=600"
			}
			else{
				theURL = "key7.htm"
				features = "toolbar=no,scrollbars=yes,resizable=yes,width=530,height=570"
			}
		
		}
		
		window.open(theURL,winName,features)

}

//*********Jump menu (Navigation menu on main map frame)
function jumpMenu3(targ,selObj,restore){ 

	var theURL = selObj.options[selObj.selectedIndex].value
	
  	//Define the action.
	if(theURL =="key.htm"){
		showKey()		
	}
	else if(theURL =="help.htm"){
		winName =  "HELP"
		features = "toolbar=no,scrollbars=yes,resizable=yes,width=690,height=555"
		window.open(theURL,winName,features)
	}
									
	else{	
		parent.window.location = theURL
	}
	
  	if (restore) selObj.selectedIndex=0
}

//*********Define the document that is loaded in the written frame.
function getDoc(){

	//Get the document name.
	var cmdString = parent.mainFrame.document.location	
	var theStart = String(cmdString).indexOf("/written/")
	var theEnd = String(cmdString).indexOf("#")
			
	if(theEnd != -1){
		var theDoc =  String(cmdString).substring((theStart + 9),theEnd)
	}
	else{
		var theDoc =  String(cmdString).substring((theStart + 9),(String(cmdString).length))
	}		

	//Define the title to print to the window
	if(theDoc == "cpt1.htm"){
		var theTitle = "Introduction"
	}
	else if(theDoc == "cpt2.htm"){
		var theTitle = "Local Plan Strategy"
	}
	else if(theDoc == "cpt3.htm"){
		var theTitle = "Overall Develpment Control Policy"
	}
	else if(theDoc == "cpt4.htm"){
		var theTitle = "Coast and Estuaries"
	}
	else if(theDoc == "cpt5.htm"){
		var theTitle = "Countryside"
	}
	else if(theDoc == "cpt6.htm"){
		var theTitle = "Urban Environment and Archaeology"
	}
	else if(theDoc == "cpt7.htm"){
		var theTitle = "Pollution and Land Resource"
	}
	else if(theDoc == "cpt8.htm"){
		var theTitle = "Community Facilities and Infrastructure Provision"
	}
	else if(theDoc == "cpt9.htm"){
		var theTitle = "University of Essex and Colchester Institute"
	}
	else if(theDoc == "cpt10.htm"){
		var theTitle = "Leisure, Recreation and Tourism"
	}
	else if(theDoc == "cpt11.htm"){
		var theTitle = "Transport"
	}
	else if(theDoc == "cpt12.htm"){
		var theTitle = "Utilities"
	}
	else if(theDoc == "cpt13.htm"){
		var theTitle = "Housing"
	}
	else if(theDoc == "cpt14.htm"){
		var theTitle = "Employment"
	}
	else if(theDoc == "cpt15a.htm"){
		var theTitle = "Town Centre and Shopping"
	}
	else if(theDoc == "cpt15b.htm"){
		var theTitle = "Town Centre and Shopping (Cont.)"
	}
	else if(theDoc == "cpt16.htm"){
		var theTitle = "Hythe and East Colchester"
	}
	else if(theDoc == "cpt17.htm"){
		var theTitle = "Garrison"
	}
	else if(theDoc == "cpt18.htm"){
		var theTitle = "Mile End"
	}
	else if(theDoc == "cpt19.htm"){
		var theTitle = "Stanway"
	}	
	else if(theDoc == "cpt20.htm"){
		var theTitle = "Tiptree"
	}
	else if(theDoc == "cpt21.htm"){
		var theTitle = "Implementation and Monitoring"
	}
	else if(theDoc == "cpt22.htm"){
		var theTitle = "Implementation Agencies by Policy Area"
	}
	else if(theDoc == "cpt23.htm"){
		var theTitle = "Extra Requirements to Policy Area"
	}
	else if(theDoc == "cpt24.htm"){
		var theTitle = "Selected Plan Targets"
	}
	else if(theDoc == "cpt25.htm"){
		var theTitle = "Glossary"
	}
	
	
	//Set window title and re-load the footer frame.
	parent.document.title = theTitle
	parent.bottomFrame.location = "written_footer.htm?" + theDoc	
	
}

//*********Opens written statement - from contents.
function openWritten(theMap){												
		theURL = "written/written_frame.htm?" + theMap  
		winName =  "Written"
		features = "toolbar=no,scrollbars=yes,resizable=yes,width=650,height=600"
		window.open(theURL,winName,features)
}

//*********Moves the Layer (locator box) on the overview map.
function movelayer(theNum,x,y) {

	if((is_nav4 == false) && (is_nav3 == false) && (is_opera2 == false) && (is_opera3 == false) && (is_opera4 == false) && (is_opera5 == false)){							//Dont move layers if NN 3-4

		//Define locator adjusts.
		if(theNum == 2){						//Inset locator
			if(is_ie5up){		
				y = y + 10
				x = x + 1
			}
			else if(is_nav6up){			
				y = y + 5
				x = x + 2
			}
			else if(is_opera5up){			
				y = y + 10
				x = x + 6
			}		
		}
		else{									//Region locator
			if(is_ie5up){			
				y = y - 10
				//x = x - 5
			}
			else if(is_nav6up){			
				y = y - 5
				x = x - 5
			}
			else if(is_opera5up){			
				y = y - 5
				x = x - 2
			}	
		}
	
		var name = "loclayer" + String(theNum)
		var layer = getLayer(name)
		
		if (is_nav4){
			layer.moveTo(x, y)
		}
		else {
			layer.left = x + "px"
			layer.top  = y + "px"
		}
	}

}

//**********Gets the layer name (4 locator box)
function getLayer(name) {

	if (is_nav4){
	   	return(document.layers[name])
	}

	else if ((is_ie == true) || (is_opera == true)) {
		layer = eval('document.all.' + name + '.style') 
	    return(layer)
	} 
	else if (is_nav6up){
		var theObj = document.getElementById(name)	
		return theObj.style
	}
	else{
	   	 return(null)
	}
}

//**********Updates the main main from the main overview map
function updatemap(e){

	//Set-up
	var imageWidth = 200 								//Width of main overview image in pixels
	var tileWidth = 25000  								//Width of main overview image in metres
	var pixpermetre =  tileWidth /imageWidth
	var tileOriginX = 584125							//Origin of main overview image in ground metres
	var tileOriginY = 211000
	tileOriginY = tileOriginY + tileWidth 				//Make origin top left

	//Get user clicked location x,y (pixels).
	if(is_nav6up){
		var theX = e.pageX			
		var theY = e.pageY
	}
	else{
		var theX = event.offsetX			
		var theY = event.offsetY
	}
	
	//Convert to real world metres.
	theX = Number(theX) * pixpermetre	
	theY = Number(theY) * pixpermetre   
	theX =  tileOriginX + theX
	theY =  tileOriginY - theY
	
	//Define the tile.
	for(i=0;i<56;i++){
		//Define extent of each inset map area
		ovblx = theinsetsmaps[i][4] 
		ovbly = theinsetsmaps[i][5] 
		ovtrx = theinsetsmaps[i][6] 
		ovtry = theinsetsmaps[i][7]
		var outSideX = "false"
		var outSideY = "false"
				
		if((theX >= ovtrx) | (theX <= ovblx)){
			outSideX = "true"		
		}
		if((theY >= ovtry) | (theY <= ovbly)){
			outSideY = "true"
		}

		if((outSideX == "false") & (outSideY == "false")){			//User has clicked within an inset map						
			var distx = theX - ovblx
			var disty = theY - ovbly
			
			var gridcnt = theinsetsmaps[i][8]
			var thecol = 1  
			while (gridcnt < distx){
				thecol = thecol + 1
				gridcnt = gridcnt + (theinsetsmaps[i][8] - theinsetsmaps[i][9])  
			}	
	 
			var gridcnt = theinsetsmaps[i][8]
			var therow = 1  
			while (gridcnt < disty){
				therow = therow + 1
				gridcnt = gridcnt + (theinsetsmaps[i][8] - theinsetsmaps[i][9])  
			}			
			
			var theTileNo =  ((therow -1) * theinsetsmaps[i][11]) + thecol

			//Adjust the tile number to agree with the standard "###"
			if(theTileNo < 10){
				theTileNo = "00" + theTileNo
			}
			else if(theTileNo < 100){
				theTileNo = "0" + theTileNo
			}
			else{
				theTileNo = String(theTileNo)
			}

			//Update main map frame
			var currentLoc = parent.window.location
			var newloc = "map_frame.htm?" + theinsetsmaps[i][0] + "_" + theTileNo
			parent.window.location = newloc	
			break																	//Quit the loop as the inset map has nbeen found.
		}
	
	}

}

//**********Updates the main map from the inset overview map
function updatemap2(e){

	//Get the current overview image.
	var cmdString = String(parent.map.document.location)
	
	var theSep
	for (n=0;n<cmdString.length; n++){
		var teststring = cmdString.substring(n,(n + 1))
		if(teststring == "/"){
			theSep = n
		}
	}
	var tempstring = cmdString.substring((theSep +1),(cmdString.length))
	for (n=0;n<tempstring.length; n++){
		var teststring =  tempstring.substring(n,(n + 1))
		if(teststring == "_"){
			theSep = n
		}
	}	
	var theName = tempstring.substring(0,theSep)
	
	//Define the tile.
	for(i=0;i<56;i++){
		if(theName.toUpperCase() == theinsetsmaps[i][0].toUpperCase()){
			var useIndex = i
		}
	}
		
	var imageWidth = 200 																		//Width of inset overview image in pixels
	var pixpermetre =  theinsetsmaps[useIndex][3] / imageWidth
	var origTLY = theinsetsmaps[useIndex][2] + theinsetsmaps[useIndex][3]		//Make origin top left

	//Get user clicked location x,y (pixels).
	if(is_nav6up){
		var theX = e.pageX			
		var theY = e.pageY
	}
	else{
		var theX = event.offsetX			
		var theY =  event.offsetY
	}

	//Convert to real world metres.
	theX = Number(theX) * pixpermetre	
	theY = Number(theY) * pixpermetre   
	theX =  theinsetsmaps[useIndex][1] + theX
	theY =  origTLY - theY

	//Define if user has clicked in the map area
	var outSideX = "false"
	var outSideY = "false"
	
	if((theX >= theinsetsmaps[useIndex][6]) || (theX <= theinsetsmaps[useIndex][4])){
		outSideX = "true"		
	}
	if((theY >= theinsetsmaps[useIndex][7]) || (theY <= theinsetsmaps[useIndex][5])){
		outSideY = "true"
	}

	//Define the new map image to load in.
	if((outSideX == "true") | (outSideY == "true")){			
		//alert("outside the area")
	}
	else{
		var distx = theX - theinsetsmaps[useIndex][4]
		var disty = theY - theinsetsmaps[useIndex][5]
		
		var gridcnt = theinsetsmaps[useIndex][8]
  		var thecol = 1  
		while (gridcnt < distx){
			thecol = thecol + 1
			gridcnt = gridcnt + (theinsetsmaps[useIndex][8] - theinsetsmaps[useIndex][9])  
		}	
 
		var gridcnt = theinsetsmaps[useIndex][8]
  		var therow = 1  
		while (gridcnt < disty){
			therow = therow + 1
			gridcnt = gridcnt + (theinsetsmaps[useIndex][8] - theinsetsmaps[useIndex][9])  
		}			
		
		var theTileNo =  ((therow -1) * theinsetsmaps[useIndex][11]) + thecol

		//Adjust the tile number to agree with the standard "###"
		if(theTileNo < 10){
			theTileNo = "00" + theTileNo
		}
		else if(theTileNo < 100){
			theTileNo = "0" + theTileNo
		}
		else{
			theTileNo = String(theTileNo)
		}
		
		var theNewHTML = "map_htm/"  + theName + "/" + theName + "_" + theTileNo + ".htm"
		eval("parent.frames.map.location= '"+ theNewHTML +"'")

	}
	
}


//*********Image click (Overview map > main map frame)
function updatemap3(e){

	//Get the current overview image.
	var cmdString = String(document.location.search)
	var theName = cmdString.substring(1,cmdString.length)
	
	//Define the tile.
	for(i=0;i<56;i++){
		if(theName.toUpperCase() == theinsetsmaps[i][0].toUpperCase()){
			var useIndex = i
		}
	}
	
	var imageWidth = 400 																		//Width of opening overview image in pixels
	var pixpermetre =  theinsetsmaps[useIndex][3] / imageWidth
	var origTL = theinsetsmaps[useIndex][2] + theinsetsmaps[useIndex][3]		//Make origin top left

	//Get user clicked location x,y (pixels).
	if(is_nav6up){
		var theX = e.pageX			
		var theY = e.pageY
		//Ajust the mouse coordinate returned to agree with the top left location of the map.
		theX = theX - 10
		theY = theY - 110
	}
	else{
		var theX = event.offsetX			
		var theY =  event.offsetY
	}

	//Convert to real world metres.
	theX = Number(theX) * pixpermetre	
	theY = Number(theY) * pixpermetre   
	theX =  theinsetsmaps[useIndex][1] + theX
	theY =  origTL - theY

	//Define if user has clicked in the map area
	var outSideX = "false"
	var outSideY = "false"
	
	if((theX >= theinsetsmaps[useIndex][6]) | (theX <= theinsetsmaps[useIndex][4])){
		outSideX = "true"		
	}
	if((theY >= theinsetsmaps[useIndex][7]) | (theY <= theinsetsmaps[useIndex][5])){
		outSideY = "true"
	}

	//Define the new map image to load in.
	if((outSideX == "true") | (outSideY == "true")){			
		//alert("outside the area")
	}
	else{
		var distx = theX - theinsetsmaps[useIndex][4]
		var disty = theY - theinsetsmaps[useIndex][5]
		
		var gridcnt = theinsetsmaps[useIndex][8]
  		var thecol = 1  
		while (gridcnt < distx){
			thecol = thecol + 1
			gridcnt = gridcnt + (theinsetsmaps[useIndex][8] - theinsetsmaps[useIndex][9])  
		}	
 
		var gridcnt = theinsetsmaps[useIndex][8]
  		var therow = 1  
		while (gridcnt < disty){
			therow = therow + 1
			gridcnt = gridcnt + (theinsetsmaps[useIndex][8] - theinsetsmaps[useIndex][9])  
		}			
		
		var theTileNo =  ((therow -1) * theinsetsmaps[useIndex][11]) + thecol

		//Adjust the tile number to agree with the standard "###"
		if(theTileNo < 10){
			theTileNo = "00" + theTileNo
		}
		else if(theTileNo < 100){
			theTileNo = "0" + theTileNo
		}
		else{
			theTileNo = String(theTileNo)
		}

		var theNewHTML = "map_frame.htm?"  + theName +  "_" + theTileNo

		//Open the selected tile in a new window
		//window.close("mapOV")
		//winName = "mapindex"
		//features = "toolbar=yes,scrollbars=yes,resizable=yes,status=yes,width=780,height=600"
		//window.open(theNewHTML,winName,features) 

		//Open the selected tile in same window
 		eval("parent.location='" + theNewHTML + "'")

	}
	
}

//*********Image click (Map index map > overview map )
function updatemap4(e){

	//Set-up
	var imageWidth = 400 								//Width of main overview image in pixels
	var imageHeight = 400 								//Width of main overview image in pixels

	var tileWidth = 25000 								//Width of main overview image in metres
	var tileHeight = 25000  							//Width of main overview image in metres

	var pixpermetreX =  tileWidth /imageWidth
	var pixpermetreY =  tileHeight /imageHeight

	var tileOriginX = 584125							//Origin of main overview image in ground metres
	var tileOriginY =  211000	
	
	tileOriginY = tileOriginY + tileHeight 				//Make origin top left

	//Get user clicked location x,y (pixels).
	if(is_nav6up){
		var theX = e.pageX			
		var theY = e.pageY
	}
	else{
		var theX = event.offsetX			
		var theY = event.offsetY
	}

	//Convert to real world metres.
	theX = Number(theX) * pixpermetreX	
	theY = Number(theY) * pixpermetreY 
	theX =  tileOriginX + theX
	theY =  tileOriginY - theY
	
	//Define the tile.
	for(i=0;i<56;i++){
		//Define extent of each inset map area
		ovblx = theinsetsmaps[i][4] 
		ovbly = theinsetsmaps[i][5] 
		ovtrx = theinsetsmaps[i][6] 
		ovtry = theinsetsmaps[i][7]
		var outSideX = "false"
		var outSideY = "false"
				
		if((theX >= ovtrx) | (theX <= ovblx)){
			outSideX = "true"		
		}
		if((theY >= ovtry) | (theY <= ovbly)){
			outSideY = "true"
		}

		if((outSideX == "false") & (outSideY == "false")){			//User has clicked within an inset map						
			var distx = theX - ovblx
			var disty = theY - ovbly
			
			var gridcnt = theinsetsmaps[i][8]
			var thecol = 1  
			while (gridcnt < distx){
				thecol = thecol + 1
				gridcnt = gridcnt + (theinsetsmaps[i][8] - theinsetsmaps[i][9])  
			}	
	 
			var gridcnt = theinsetsmaps[i][8]
			var therow = 1  
			while (gridcnt < disty){
				therow = therow + 1
				gridcnt = gridcnt + (theinsetsmaps[i][8] - theinsetsmaps[i][9])  
			}			
			
			var theTileNo =  ((therow -1) * theinsetsmaps[i][11]) + thecol

			//Adjust the tile number to agree with the standard "###"
			if(theTileNo < 10){
				theTileNo = "00" + theTileNo
			}
			else if(theTileNo < 100){
				theTileNo = "0" + theTileNo
			}
			else{
				theTileNo = String(theTileNo)
			}
						
			//Open the selected tile in a new window 
			theURL = "map_opening.htm?" + theinsetsmaps[i][0] 	
			//winName = "mapOV"
			//features = "toolbar=no,scrollbars=yes,resizable=no,width=450,height=500"
			//window.open(theURL,winName,features)
			//break
						
			//Open the selected tile in same window 
			eval("parent.location='" + theURL + "'")				
			break																	//Quit the loop as the inset map has nbeen found.
		}
	
	}		
}

//*********Jump menu (map index > main map) (NN4 only)
function openMapsNN4(targ,selObj,restore){ 
 	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'")
  	if (restore) selObj.selectedIndex=0
}

//*********Jump menu (Map list map > Inset OV map frame)
function openInsetOV(targ,selObj,restore){ 

	//Open in current window
 	eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'")
	//Open in new window
	//theURL = selObj.options[selObj.selectedIndex].value 	
	//winName = "mapOV"
	//features = "toolbar=no,scrollbars=no,resizable=no,width=450,height=500"
	//window.open(theURL,winName,features)	
  	if (restore) selObj.selectedIndex=0
	
}

//*********Define the Browser window title to = map/inset name.
function defineMapTitle(theMapNo){
if(theMapNo == "INSET_19"){
  theTitle = "EAST MERSEA D14"
}
else if(theMapNo == "INSET_42"){
  theTitle = "SALCOTT AND VIRLEY D30"
}
else if(theMapNo == "INSET_29"){
  theTitle = "GREAT WIGBOROUGH D20"
}
else if(theMapNo == "INSET_41"){
  theTitle = "PELDON  D29"
}
else if(theMapNo == "INSET_01"){
  theTitle = "LANGENHOE - ABBERTON C1"
}
else if(theMapNo == "INSET_23"){
  theTitle = "FINGRINGHOE - ABBERTON ROAD D16"
}
else if(theMapNo == "INSET_22"){
  theTitle = "FINGRINGHOE - CONSERVATION AREA CA3"
}
else if(theMapNo == "INSET_24"){
  theTitle = "FINGRINGHOE - HIGH PARK CORNER D17"
}
else if(theMapNo == "INSET_33"){
  theTitle = "LAYER-DE-LA-HAYE - MALTING GREEN C5"
}
else if(theMapNo == "INSET_32"){
  theTitle = "LAYER BRETON D23"
}
else if(theMapNo == "INSET_04"){
  theTitle = "BIRCH D3"
}
else if(theMapNo == "INSET_06"){
  theTitle = "BIRCH - CONSERVATION AREA CA1"
}
else if(theMapNo == "INSET_05"){
  theTitle = "BIRCH - HARDY'S GREEN D4"
}
else if(theMapNo == "INSET_34"){
  theTitle = "LAYER MARNEY - SMYTHES GREEN D2"
}
else if(theMapNo == "INSET_39"){
  theTitle = "MESSING D27"
}
else if(theMapNo == "INSET_18"){
  theTitle = "EASTHORPE D15"
}
else if(theMapNo == "INSET_12"){
  theTitle = "COPFORD GREEN D10"
}
else if(theMapNo == "INSET_13"){
  theTitle = "COPFORD - LONDON ROAD D9"
}
else if(theMapNo == "INSET_38"){
  theTitle = "MARKS TEY - LONDON ROAD C6(B)"
}
else if(theMapNo == "INSET_37"){
  theTitle = "MARKS TEY - COGGESHALL ROAD C6(A)"
}
else if(theMapNo == "INSET_36"){
  theTitle = "LITTLE TEY D26"
}
else if(theMapNo == "INSET_28"){
  theTitle = "GREAT TEY D19"
}
else if(theMapNo == "INSET_02"){
  theTitle = "ALDHAM D1"
}
else if(theMapNo == "INSET_20"){
  theTitle = "EIGHT ASH GREEN - CHOATS CORNER C3(A)"
}
else if(theMapNo == "INSET_03"){
  theTitle = "ALDHAM - FORD STREET D2"
}
else if(theMapNo == "INSET_10"){
  theTitle = "CHAPPEL - SWAN STREET D8"
}
else if(theMapNo == "INSET_11"){
  theTitle = "CHAPPEL & WAKES COLNE D7"
}
else if(theMapNo == "INSET_25"){
  theTitle = "FORDHAM D18"
}
else if(theMapNo == "INSET_46"){
  theTitle = "WORMINGFORD D32"
}
else if(theMapNo == "INSET_43"){
  theTitle = "WAKES COLNE - MIDDLE GREEN D31(B)"
}
else if(theMapNo == "INSET_44"){
  theTitle = "WAKES COLNE - MIDDLE GREEN D31(A)"
}
else if(theMapNo == "INSET_45"){
  theTitle = "WEST BERGHOLT C8"
}
else if(theMapNo == "INSET_27"){
  theTitle = "GREAT HORKESLEY - HORKESLEY HEATH C4B"
}
else if(theMapNo == "INSET_26"){
  theTitle = "GREAT HORKESLEY C4A"
}
else if(theMapNo == "INSET_35"){
  theTitle = "LITTLE HORKESLEY D25"
}
else if(theMapNo == "INSET_09"){
  theTitle = "BOXTED - WORKHOUSE HILL D6"
}
else if(theMapNo == "INSET_07"){
  theTitle = "BOXTED CROSS D5"
}
else if(theMapNo == "INSET_08"){
  theTitle = "BOXTED - CONSERVATION AREA CA2"
}
else if(theMapNo == "INSET_31"){
  theTitle = "LANGHAM - LANGHAM MOOR D22"
}
else if(theMapNo == "INSET_30"){
  theTitle = "LANGHAM - ST MARGARETS CROSS D21"
}
else if(theMapNo == "INSET_17"){
  theTitle = "DEDHAM - LAMB CORNER D12"
}
else if(theMapNo == "INSET_15"){
  theTitle = "DEDHAM HEATH D11"
}
else if(theMapNo == "INSET_16"){
  theTitle = "DEDHAM - BARGATE LANE/LONG RD D13"
}
else if(theMapNo == "INSET_55"){
  theTitle = "WEST MERSEA INSET B3"
}
else if(theMapNo == "INSET_47"){
  theTitle = "LANGHAM AIRFIELD - RURAL BUSINESS SITE EMP5(II)"
}
else if(theMapNo == "INSET_50"){
  theTitle = "WORMINGFORD AIRFIELD - RURAL BUSINESS SITE EMP5(VIII)"
}
else if(theMapNo == "INSET_49"){
  theTitle = "WALDESGRAVES - RURAL BUSINESS SITE EMP5(VII)"
}
else if(theMapNo == "INSET_48"){
  theTitle = "GREAT TEY - TEY BROOK - RURAL BUSINESS SITE EMP5(V)"
}
else if(theMapNo == "INSET_21"){
  theTitle = "EIGHT ASH GREEN - FORDHAM HEATH C3(B)"
}
else if(theMapNo == "INSET_54"){
  theTitle = "TIPTREE INSET B2"
}
else if(theMapNo == "INSET_53"){
  theTitle = "COLCHESTER - EAST COLCHESTER INSET"
}
else if(theMapNo == "INSET_52"){
  theTitle = "COLCHESTER - CENTRAL AREA INSET"
}
else if(theMapNo == "INSET_14"){
  theTitle = "DEDHAM C2"
}
else if(theMapNo == "INSET_40"){
  theTitle = "MOUNT BURES D28"
}
else if(theMapNo == "INSET_51"){
  theTitle = "COLCHESTER INSET"
}
else if(theMapNo == "PROPOSALS"){
  theTitle = "PROPOSALS MAP"
}
else{
theTitle = ""
}
return theTitle
}

//********Get the attribute and open the written doc in new window or open a list of policies (called on main map click).
function getatt(thePolRef,theDoc){

    if(thePolRef != ""){	
		//var comm = thePolRef.indexOf(",")
		//if(comm == -1){												//Only one policy selected.
		
			//Remove any specifics eg (1) etc. from the policy reference.
		//	var test = thePolRef.indexOf(" ")
		//	if(test != -1){
		//		var newPolRef = thePolRef.substring(0,test)
		//		thePolRef = newPolRef
		//	}
		//	
		//	theURL = "../../written/written_frame.htm?cpt" + theDoc + ".htm&" + thePolRef	
		//	winName =  "Written"  
		//	features = "toolbar=yes,scrollbars=yes,resizable=yes,width=630,height=500"
		//	window.close(winName)
		//	window.open(theURL,winName,features)
		//}
		//else														//More than one policy selected.
		//{
			thePolRef = thePolRef + ",DC1"
			theDoc = theDoc + ",3"
			polIndex(thePolRef,theDoc)
		//}
	}		
}	

//*********Opens index of policies realating to selected site the user has clicked on.
function polIndex(thePolRef,theDoc){																		
	theURL = "../../pol_index.htm?" + thePolRef + "&" + theDoc	
	winName = "thePolIndex"
	features = "toolbar=yes,scrollbars=yes,resizable=yes,width=630,height=500"
	window.close(winName)
	window.open(theURL,winName,features)		
}

//*******************Opens HELP in new Browser window.
function openWindow(theURL) { 
	winName =  "HELP"
	features = "toolbar=no,scrollbars=yes,resizable=yes,width=690,height=555"
	window.open(theURL,winName,features)
}

//*******************Defines the map to load from the postcode search.
function getSelectedPC(selObj){
	
	//Passed grid location.
	var gridLoc = selObj.options[selObj.selectedIndex].value
			
	//Open overview map.
	var newloc = "map_frame.htm?" + gridLoc
	eval("parent.location='" + newloc + "'")			
					
}

/*
***********END of Script
*/