﻿<!--
// Copyright (c) 2006-09 Easy2.com, Inc. All rights reserved.

// Populate the variable below with the text or image that will launch a product demo.
//var easy2LinkDisplay = "<img src=\"http://cloud.shop.pgatoursuperstore.com/images/buttons/viewproductdemo.gif\" border=\"0\" class=\"hover pdtop\" />";
var easy2LinkDisplay = '<img src="http://cloud.shop.pgatour.com/images/buttons/product-demonstration-video.gif" width="774" height="24" />';


// The "document.write" code below can be changed to a <div>, <p> or <td> if needed, BUT MAKE SURE THE ID IS NOT CHANGED.
//document.write('<span id=\"easy2Container_pgss_320\" style=\"display: none;\"></span>');

// *********************************************************************************************************************
// ***************************************Do not change the code below this line.***************************************
// *********************************************************************************************************************

function easy2CheckModules(easy2IncludeID) {	
	var this_container = document.getElementById('easy2Container_' + easy2IncludeID);
	if(this_container && easy2IncludeID.indexOf('_') != -1) {
		var check_url = 'http://includes.easy2.com/dyna_includes2/actions/check_image.asp';
		var launch_url = 'http://webapps.easy2.com/dyna_includes2/actions/master_page.asp';
		var this_url = easy2CurrentURL();
		var this_script = document.getElementById('easy2Script_' + easy2IncludeID);
		var imgObj = document.createElement('img');
		
		var e2_vars = '?e2__dyna_include_pid=' + easy2IncludeID.split('_')[1];
		e2_vars += '&e2__dyna_include_host=' + easy2IncludeID.split('_')[0];
		e2_vars += '&e2__dyna_include_url=' + escape(this_url);
		
		if(this_script && this_script.src && this_script.src != '') {
			var arrURL = this_script.src.split('?');  
			if(arrURL.length > 1) e2_vars += '&' + arrURL[1];
		}
		
		imgObj.onload = function() {
			launch_url += e2_vars;
			var m = document.getElementById('Media');
			m.innerHTML = '<iframe id="MediaFrame" width="774" height="500" src="'+launch_url+'" frameborder="0" scrolling="no"></iframe>' + m.innerHTML;
			//var this_link = '<a href=\"#\" onclick=\"easy2PopOpenWin(\'' + launch_url + '\', \'easy2Window\', 600, 450); return false;\">';
			//this_link += easy2LinkDisplay;
			//this_link += '</a>';
			//this_container.innerHTML = this_link;
			this_container.style.display = '';
			imgObj = null;
		}
		
		imgObj.onerror = function() {
			imgObj = null;
		}
		
		check_url += e2_vars;
		imgObj.src = check_url;	
	}	
}

function easy2PopOpenWin(theURL, Name, popW, popH) {
	theURL += (theURL.indexOf('?') > -1) ? '&' : '?';
	theURL += 'referurl=' + easy2CurrentURL();
	var winHorz = (screen.width-popW)/2;
	var winVert = (screen.height-popH)/2;
	var winProp = 'width=' + popW + ',height=' + popH + ',left=' + winHorz + ',top=' + winVert + ',scrollbars=yes,resizable=yes';
	easy2PopWin = window.open(theURL, Name, winProp);
	if (easy2PopWin && !easy2PopWin.closed && easy2PopWin.top && window.focus) {easy2PopWin.focus()};
	return false;
}

function easy2CurrentURL() {
	var thisURL = window.location.href.toString();
	var arrURL = thisURL.split('?');
	var thisURL = unescape(arrURL[0]);
	if(arrURL.length > 1) thisURL += '?' + arrURL[1];
	return thisURL;
}	

easy2CheckModules('pgss_320');

//-->


