///// functions for  webtv /////////

var dObj = new Date();
var today = dObj.getFullYear().toString() + dObj.getMonth().toString() + dObj.getDate().toString() + dObj.getHours().toString();

function randomVpMetaFlag() {
    var nocomFlagArray = ["noprerolls","nooverlays"];
    var rand = Math.random();
    rand = (rand < 0.66) ? Math.floor(rand) : Math.ceil(rand);
    return nocomFlagArray[rand];
  };


///// Other functions /////////
function NewWindow(bredde,hoyde,url) {
			window.open(url,"ShowProdWindow","menubars=0,scrollbars=1,resizable=1,height="+hoyde+",width="+bredde);
		}
	function DP(theURL) { 
  window.open(theURL,'FORUMPOPUP','scrollbars=yes,toolbar=no,location=no, directories=no,status=no,menubar=no,Resizable=yes,width=500,height=620,top=10,left=10');
	}

///// GOOGLEMAPS /////////
var map = null;
var geocoder = null;
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
// do not show SATELLITE map type button
map.removeMapType(G_SATELLITE_MAP);
// show map controls (zoom etc)
map.addControl(new GSmallMapControl());
// allow switch between different map types
map.addControl(new GMapTypeControl());
// show a default map
//map.setCenter(new GLatLng(37.4419, -122.1419), 13);
geocoder = new GClientGeocoder();
}
}
function showAddress(address,title) {
if (geocoder) {
geocoder.getLatLng(address,
function(point) {
// if the address is valid then show the map
if (point) {
map.clearOverlays();
// show the address, zoom to 16, using HYBRID map type
map.setCenter(point, 16, G_HYBRID_MAP);
var marker = new GMarker(point);
// show a marker
map.addOverlay(marker);
// show address information in a bubble
//marker.openInfoWindowHtml(adress);
}
}
);
}
}