// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 6;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------

var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

/**
*
*/
function generateHubPortal(QueryString, context)
{
	if(hasReqestedVersion)
	{
   		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="750">');
   		document.write('<param name="movie" value="hub_portal.swf?' + QueryString + '&context='  + context + '&t=1">');
   		document.write('<param name="quality" value="high">');
   		document.write('<param name="wmode" value="transparent">');
   		document.write('<embed src="hub_portal.swf?' + QueryString + '&context='  + context + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" width="800" height="750"></embed>');
		document.write('</object>');
	}
	else
	{
		var alternateContent = 'Flash 6 required.<BR>'
		+ 'This content requires the Adobe Flash Player. '
		+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

/**
this is just for the nav
*/
function generateSuzukiNav(QueryString)
{
	if(hasReqestedVersion)
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="85">');
		document.write('<param name="movie" value="/hub_navOnly.swf?' + QueryString + '">');
		document.write('<param name="quality" value="high">');
		document.write('<embed src="/hub_navOnly.swf?' + QueryString + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" width="800" height="85"></embed>');
		document.write('</object>');
	}
	else
	{
		var alternateContent = 'Flash 6 required.<BR>'
		+ 'This content requires the Adobe Flash Player. '
		+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}


function generateWebeditLoginTop(QueryString)
{
	if(hasReqestedVersion)
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="780" height="85">');
		document.write('<param name="movie" value="/client/modules/site/sd/header_webedit_login.swf?' + QueryString + '">');
		document.write('<param name="quality" value="high">');
		document.write('<embed src="/client/modules/site/sd/header_webedit_login.swf?' + QueryString + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" width="780" height="85"></embed>');
		document.write('</object>');
	}
	else
	{
		var alternateContent = 'Flash 6 required.<BR>'
		+ 'This content requires the Adobe Flash Player. '
		+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

/**
*
*/
function generateExternalSuzukiContent(QueryString)
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="757" height="416">');
document.write('<param name="movie" value="hub_external.swf?' + QueryString + '">');
document.write('<param name="quality" value="high">');
document.write('<embed src="hub_external.swf?' + QueryString + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" width="757" height="416"></embed>');
document.write('</object>');
}


function loadUCL(siteType) {
	//var dirty = 0;
	window.location = '/ucl.asp?thisSiteType=' + siteType
}


function unloadMess(){

		if(dirty == 1){
			mess = "If you are clicking back or forward, please use the buttons\r located in the bottom left hand corner of our site."
			return mess;
		}
}

function setBGColor(c)
{
	document.bgColor = c;
}

function popupPictureWindow(dealerID, dealerURL)
{
	window.open("upload/load_dealer_pic.asp?dealerID=" + dealerID + "&dealerURL=" + dealerURL, "loadPicture", "width=300,height=400");
}

function popupLogoWindow(dealerID, dealerURL)
{
	window.open("upload/load_dealer_logo.asp?dealerID=" + dealerID + "&dealerURL=" + dealerURL, "loadImage", "width=300,height=400");
}

function popupTopicWindow(session_ID)
{
	window.open("upload/load_topic_image.asp?session_ID=" + session_ID, "loadImage", "width=300,height=400");
}

function popupReplyWindow(session_ID)
{
	window.open("upload/load_reply_image.asp?session_ID=" + session_ID, "loadImage", "width=300,height=400");
}