function openWindow(url) {	
  popupWin = window.open(url,'new_page1','width=370,height=370x=0,y=0 resizable=no status=no title=no screenX = 5,screenY = 15,top = 5,left = 15')
}

function longDate() {

	<!--
				var dtmToday = new Date();		
				var dtmMonth = dtmToday.getMonth();
				var month = new Array();
				var Day = new Array();
				
				dtmDay = dtmToday.getDay();
				dtmDate = dtmToday.getDate();
				dtmD = dtmToday.getDate();		
						
				if (dtmD == 3)
				{
					iText = "rd";
				}
				else if (dtmD == 2)
				{
					iText = "nd";
				}
				else if (dtmD == 1)
				{
					iText = "st";
				}
				if (dtmD == 23)
				{
					iText = "rd";
				}
				else if (dtmD == 22)
				{
					iText = "nd";
				}
				else if (dtmD == 21)
				{
					iText = "st";
				}
				else if (dtmD == 31)
				{
					iText = "st";
				}
				else
				{
					iText = "th";
				}
 
				month[0] = "January";
				month[1] = "February";
				month[2] = "March";
				month[3] = "April";
				month[4] = "May";
				month[5] = "June";
				month[6] = "July";
				month[7] = "August";
				month[8] = "September";
				month[9] = "October";
				month[10] = "November";
				month[11] = "December";
				
				Day[0] = "Sunday";
				Day[1] = "Monday";
				Day[2] = "Tuesday";
				Day[3] = "Wednesday";
				Day[4] = "Thursday";
				Day[5] = "Friday";
				Day[6] = "Saturday";
								
				document.write("<font size='1' face='Verdana' >" + Day[dtmDay] + ", " + month[dtmMonth] + " " + dtmDate + iText);
				//-->
}

function greeting() {

<!--
			
				var dtmToday = new Date();
				dtmHours = dtmToday.getHours();
		
				if (dtmHours <= 11)
				{
					msgText = "Good Morning";
				}
				else if (dtmHours >= 12 && dtmHours <= 17)
				{
					msgText = "Good Afternoon";
				}
				else
				{
					msgText = "Good Evening";
				}
		
				document.write("<font size='1' face='Verdana'>&nbsp;&nbsp;" + msgText);
				//-->
				
}

function loadmap() {
  if (GBrowserIsCompatible()) {
  	resizeApp();
	var map = new GMap2(document.getElementById("map"));
	if (map) {
		map.setCenter(new GLatLng(51.165425,-3.501753), 8); 		
		map.addControl(new GLargeMapControl());
		map.addControl(new GOverviewMapControl());
		// 		
		address = '<span class="sectionHeader"> Bickham Manor<br />Timberscombe<br />MINEHEAD<br />SOMERSET, TA24 7UA</span>';
		var marker = createInfoMarker(map.getCenter(), address);		
		map.addOverlay(marker);
		// open the info window automatically
		marker.openInfoWindowHtml(address);
	}
  }
}

// Create the marker and corresponding information window
function createInfoMarker(point, address) {
   var marker = new GMarker(point);
   // open the info window when maker clicked	 
   GEvent.addListener(marker, "click",
      function() {
         marker.openInfoWindowHtml(address);
      }
   );
  
  return marker;
}

function resizeApp() {
	var minW = 600;
    var minH = 600;
	
	var offsetTop = 0;	
	var mapElem = e("map");	
		
	var resizeMe = false;
    var winW = parseInt(getPageWH("w"));
    var winH = parseInt(getPageWH("h"));
    if(minW>winW){winW=minW;resizeMe=true;}
    if(minH>winH){winH=minH;resizeMe=true;}
	
	// mapElem.innerHTML = "(" + parseInt(getPageWH("w")) + "," + parseInt(getPageWH("h")) + ")";
	mapElem.style.height = (winH / 2) + "px";
	mapElem.style.width = (winW / 2) + "px";	
	
	//loadmap();
	
}

function getPageWH(xPart){
          if( typeof window.innerWidth  == 'number' ) {
            pageW = window.innerWidth;
            pageH = window.innerHeight;
          } 
          else if(document.documentElement && 
                     document.documentElement.clientWidth ) {
            pageW = document.documentElement.clientWidth;
            pageH = document.documentElement.clientHeight;
          } 
          else{
            pageW = document.body.clientWidth;
            pageH = document.body.clientHeight;
          }
          if(xPart=="w")return pageW;
          else return pageH
        }
		

function e(id) {
	return document.getElementById(id);
}

	
