var widget_id='94'; 
var connectionID = "PS_"+Math.floor(Math.random()*100); 
function getConnectionID(){return connectionID;} 
function changeDimensions(id, width, height){ 
	e = document.getElementById(id); 
	if(height || height == 0){e.style.height = height+'px';} 
	if(width || width == 0){e.style.width = width+'px';} 
} 
var timestamp = Math.floor(new Date().getTime()/1000);

var PSHcollection = getURLVarValue("cid");
var PSHproduct = getURLVarValue("pid");

var flashvars = (PSHcollection && PSHproduct) ? {xmlURL:"http://cw.personalshopper.com.s3.amazonaws.com/cw/94/widget.xml?pscwts=" + timestamp, collectionID: PSHcollection, productID: PSHproduct} : {xmlURL:"http://cw.personalshopper.com.s3.amazonaws.com/cw/94/widget.xml?pscwts=" + timestamp};
flashvars.omnitureSuite = "personalshoppercomcw";

function getURLVarValue(urlVar){
	var urlArr = window.location.href.split("?")[1];
	var varArr, i, n, comp;
	if(urlArr){
		varArr = urlArr.split("&");
		if(varArr.length > 0){
			for(i=0;i<varArr.length;i++){
				comp = varArr[i].split("=");
				if(comp[0] == urlVar){
					return comp[1];
				}
			}
		}
	}
	return false;
}

var params = {}; 
params.wmode = "transparent"; 
params.scale = "noscale"; 
params.salign = "tl"; 
params.allowScriptAccess = "always"; 
var attributes = {}; 

document.getElementById('pscw_94_container').innerHTML =  
"     <div id=\"psFlashWidgetObj\" style=\"width:550px;height:575px;\">" + 
"       <div id=\"pscw_wid_94\">" + 
"         <p style=\"display:none;\"><a href=\"http://www.personalshopper.com\">www.personalshopper.com</a></p></div></div>";

swfobject.embedSWF("http://cw.personalshopper.com.s3.amazonaws.com/swf/cw/RDholiday.swf", "pscw_wid_94", "550", "600", "9.0.28.0","http://cw.personalshopper.com.s3.amazonaws.com/swf/cw/expressInstall.swf", flashvars, params, attributes); 
swfobject.createCSS("#pscw_wid_94","outline:none");
