    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }

function openwin(url,ww,wh){
	window.open(url,'openwin','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////KINGWEBMASTER THICKBOX OPTIONS////////////////////////////////////////////////////////////////////
function moveoptions ()	{
	document.getElementById('tbooptions').innerHTML = document.getElementById('optcont').innerHTML;
}
function addoptions	()	{
	document.getElementById('added').style.display = 'block';
	document.getElementById('remove').style.display = 'block';
	document.getElementById('addchange').style.display = 'block';
	document.getElementById('removed').style.display = 'none';
	document.getElementById('optorig').style.display = 'none';	
}
function remove ()	{
	document.getElementById('added').style.display = 'none';
	document.getElementById('remove').style.display = 'none';
	document.getElementById('addchange').style.display = 'none';
	document.getElementById('removed').style.display = 'block';
	document.getElementById('optorig').style.display = 'block';
	document.getElementById('tbooptions').innerHTML = '';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function expandlist (num)	{
	//alert(document.getElementById('collapsed' + num).style.display);
	
	if ((document.getElementById('collapsed' + num).style.display  == '') || (document.getElementById('collapsed' + num).style.display  == 'none'))	{
		document.getElementById('collapsed' + num).style.display = 'block';
	}else{
		document.getElementById('collapsed' + num).style.display = 'none';
	}
	
}



function createCookie (name, value, expires, path, domain, secure) {
	var today = new Date();
	today.setTime (today.getTime());
	
	if (expires) {
		expires = expires * 1000 * 60 * 60 * 24;
	}

	var expires_date = new Date (today.getTime() + (expires));
	document.cookie = name + "=" +escape( value ) + ((expires) ? ";expires=" + expires_date.toGMTString() : "" ) + ((path) ? ";path=" + path : "" ) + ((domain) ? ";domain=" + domain : "" ) + ((secure) ? ";secure" : "" );
}

function readCookie (check_name) {
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false;

	for ( i = 0; i < a_all_cookies.length; i++ ) {
		a_temp_cookie = a_all_cookies[i].split( '=' );
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');

		if (cookie_name == check_name) {
			b_cookie_found = true;

			if ( a_temp_cookie.length > 1 ) {
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}

			return cookie_value;
			break;
		}

		a_temp_cookie = null;
		cookie_name = '';
	}

	if (!b_cookie_found) {
		return null;
	}
}

function log_affiliates () {
	var affiliate_code;

	var affiliate_var = "ac=";
    var affiliate_start = window.location.href.indexOf (affiliate_var, 0);
	if (affiliate_start != -1) {
		affiliate_code = window.location.href.substring (affiliate_start + affiliate_var.length, window.location.href.length);

		createCookie ('PM-Affiliate', affiliate_code, 1, '/', 'kingwebmaster.com', '');
	}

	affiliate_code = readCookie ('PM-Affiliate');

	if (affiliate_code) {
		if (document.sign_up_form)
			document.sign_up_form.referred.value = affiliate_code;
	}
}

function publish_saver () {
	document.getElementById('caption').style.display = 'none';
}

if (window.location.href.indexOf ('yahoo-store-backend-shipping.html') != -1)
	window.onload = publish_saver;