// JavaScript Document

if(typeof(PJS.product) == "undefined"){
//
PJS.product = function(){};
}//

if(typeof(PJS.product.video) == "undefined"){
//
PJS.product.video = function(){
	this.xc_url = "ws/product/";
	this.data_url = "/video/dataxml.asp?";
	this.fv_src = "plugins/video/mplayer.swf";
	this.fv_w = 480;
	this.fv_h = 320;
};
PJS.product.video.prototype.xc = function(m,p){
	xcb(this.xc_url,'wsp_'+m,p);
};
PJS.product.video.prototype.init = function(){
	this.dialog = new PJS.dialog();
	this.dialog._setHead("Video");
	this.dialog.toggled = false;
	this.dialog.setStyle("background-color", "#000000");
	var _obj = this.dialog;
	this.dialog.onclose = function(){
		_obj.clear();
	};
};
PJS.product.video.prototype.call = function(){
	
};
PJS.product.video.prototype.ps = function(pid,type){
	var ps = "";
	ps += "url="+this.data_url;
	ps += "pid="+pid;
	ps += "&type="+type;
	
	return ps;
};
PJS.product.video.prototype.fp = function(ps){
	var fvsrc = BASE_URL+this.fv_src;
	var c = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+this.fv_w+'" height="'+this.fv_h+'" id="mvplayer" align="middle">';
	c += '<param name="allowScriptAccess" value="sameDomain" />';
	c += '<param name="allowFullScreen" value="false" />';
	c += '<param name="FlashVars" value="'+ps+'" />';
	c += '<param name="movie" value="'+fvsrc+'" />';
	c += '<param name="quality" value="high" />';
	c += '<param name="bgcolor" value="#000000" />';
	c += '<embed src="'+fvsrc+'" FlashVars="'+ps+'" quality="high" bgcolor="#000000" width="'+this.fv_w+'" height="'+this.fv_h+'" name="mvplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />';
	c += '</object>';
	
	return c;
};
PJS.product.video.prototype.show = function(pid,type){
	var c = this.fp(this.ps(pid,type));
	//this.dialog._setContent(c);
	this.dialog._setSize(this.fv_w+16,this.fv_h+2);
	this.dialog.show();
	this.dialog.setContent(c);
};
//
var p_pvideo = new PJS.product.video();
PJS.addLoadEvent(function(){p_pvideo.init();});
//
//mvp loaded
function mvp_ac(p) {
}
//
}//end PJS.product.video

