Model = function( id, name, xCoord, yCoord, components ) {
	this.id = id;
	this.name = name;
	this.xCoord = xCoord;
	this.yCoord = yCoord;
	this.components = components;
}//end class

Component = function( id, name, zIndex, xCoord, yCoord, layers, listIndex, active ) {
	this.id = id;
	this.name = name;
	this.zIndex = zIndex;
	this.xCoord = xCoord;
	this.yCoord = yCoord;
	this.layers = layers;
	this.listIndex = listIndex;
	this.active = active;
}//end class 

Layer = function( id, name, mediaId, xCoord, yCoord, editable, associatedLayers, color ) {
	this.id = id;
	this.name = name;
	this.mediaId = mediaId;
	this.xCoord = xCoord;
	this.yCoord = yCoord;
	this.editable = editable;
	this.associatedLayers = associatedLayers;
	this.color = color;
}//end class

Media = function( id, name, sourceUri ) {
	this.id = id;
	this.name = name;
	this.sourceUri = sourceUri;
}//end class

Color = function( id, name, redOffset, greenOffset, blueOffset ) {
	this.id = id;
	this.name = name;
	this.redOffset = redOffset;
	this.greenOffset = greenOffset;
	this.blueOffset = blueOffset;
}//end class

URLUtil = function(namespace, siteUrl, pageName){
	
	this.namespace = namespace.substring(2,34);
		
	this.siteUrl = siteUrl;
	this.pageName = pageName;
	
	this.parameters = Object();
}

URLUtil.prototype.addParameter = function (name, value){
	this.parameters[name] = value;
}

URLUtil.prototype.toRenderURL = function(){

	var url = this.siteUrl + "/template.PAGE/" + this.pageName + "/?javax.portlet.tpst=" + this.namespace;

	for(var k in this.parameters){
		url += "&javax.portlet.prp_" + this.namespace + "_" + k + "=" + this.parameters[k];
	}
	
	return url;
}


URLUtil.prototype.toSoloURL = function(){

	var url = this.siteUrl + "/template.SOLO/" + this.pageName + "/?javax.portlet.tpst=" + this.namespace + "_ws_SO";
				
	for(var k in this.parameters){
		url += "&javax.portlet.prp_" + this.namespace + "_" + k + "=" + this.parameters[k];
	}
	
	return url;
}
function getFlashMovieObject( movieName ) {

	if (window.document[movieName]) {
      return window.document[movieName];
  }//end if
  
  if (navigator.appName.indexOf("Microsoft Internet")==-1) {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  } else {
    return document.getElementById(movieName);
  }//end if/else

  
}//end function

function insertFlashMovie( width,  height, path, src, divId, params, flashVars){
	//alert(' inserting ' + divId + " from " + src);
	swfobject.embedSWF(path + src + ".swf", divId, width, height, "9.0.0", path + "expressInstall.swf", flashVars, params);

}

function insertFlash(){
	insertFlashMovie('100%','100%','flash/colorize');

	
}//end function