//var flashvars = {usernumber:"124492",setid: "0"};var params = {allowfullscreen: "true",allowscriptaccess: "always"};swfobject.embedSWF("http://seel.peevee.tv/peeveeshop/peeveeshop.swf", "peeveeshopping", "800", "530", "9.0.0", "expressInstall.swf",flashvars,params);
var strPlayerFilename = "http://seel.peevee.tv/peeveeshop/peeveeshop2_";

var PVShoppingPlayer = function(usernumber, setid, width, height,option, layoutType)
{
	this.option = null;
	this.usernumber = usernumber;
	this.setid = setid;
	this.width = width;
	this.height = height;
	this.option = option;
	this.layoutType = layoutType;
/*
	if(contenturl) {
		var rObj = new RegExp("48([0-9]{6})peevee([0-9]*).");
		var res = contenturl.match(rObj);
		usernumber = Number(res[1]);
		contentnumber = Number(res[2]);
	}
	this.usernumber = usernumber;
	this.contentnumber = contentnumber;
*/
}

var PVSP = PVShoppingPlayer.prototype;

PVSP.write = function()
{
	var Volume	= 100;
	var AutoPlay 	= false;
	var PlayAll 	= false;
	var BlogTag 	= true;
	var FullScreen 	= true;
	var Message		= false;
	var ExternalCounter = true;

	var strFlagString = "";

	strFlagString += "&Volume=" + Volume;

	if ( AutoPlay ) {
		strFlagString += "&AutoPlay=true";
	} else {
		strFlagString += "&AutoPlay=";
	}

	if ( PlayAll ) {
		strFlagString += "&PlayAll=true";
	} else {
		strFlagString += "&PlayAll=";
	}

	if ( BlogTag ) {
		strFlagString += "&BlogTag=true";
	} else {
		strFlagString += "&BlogTag=";
	}

	if ( FullScreen ) {
		strFlagString += "&FullScreen=true";
	} else {
		strFlagString += "&FullScreen=";
	}

	if ( Message ) {
		strFlagString += "&Message=true";
	} else {
		strFlagString += "&Message=";
	}
/*
	if ( ExternalCounter ) {
		strFlagString += "&ExternalCounter=true";
	} else {
		strFlagString += "&ExternalCounter=false";
	}
*/
	if ( this.width <= 200 ) {
		strFlagString += "&SmallFlag=true";
		this.height;
	} else {
		strFlagString += "&SmallFlag=";
	}

	strFlagString = "&contextURL=" + location.href;
	strFlagString += "&layoutType=" + this.layoutType;
	strFlagString += "&rnd=1";

	strPlayerFilename += this.layoutType + ".swf";

	if(this.option != undefined && this.option != null )
		strFlagString += "&" + this.option;

  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + this.width + '" height="' + this.height + '" id="dummy_player_large" align="middle">');
  document.write('<param name="allowScriptAccess" value="always" />');
  document.write('<param name="allowFullScreen" value="true" />');
  document.write('<param name="movie" value="' + strPlayerFilename +  '" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="FlashVars" value="usernumber=' + this.usernumber + '&setid=' + this.setid + strFlagString + '" />');
  document.write('<param name="wmode" value="transparent">');
  document.write('<embed wmode="transparent" src="'+strPlayerFilename+'" quality="high" width="' + this.width + '" height="' + this.height + '" name="dummy_player_large" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="usernumber=' + this.usernumber + '&setid=' + this.setid + strFlagString + '" />');
  document.write('</object>');
//  document.write('<img src="/externalcounter.jspx?Usernumber='+this.usernumber+'&Contentnumber='+this.contentnumber+'">');
}

