function ProductCommands_FileSystem_Product_Click(){}
function ProductCommands_FileSystem_ConvinceMe_Click(){}
function ProductCommands_FileSystem_Specification_Click(){}
function ProductCommands_FileSystem_PDFFile_Click(){}
function ProductCommands(productID, queryString)
{
this.Timer = null;
this.MediaPlayer = new MediaPlayer();
this.AudioPlayer = new AudioPlayer();
this.CurrentProductID = productID;
this.QueryString = queryString;
}
ProductCommands.prototype.product_image = "images/cat_img/new/product.gif";
ProductCommands.prototype.productHover_image = "images/cat_img/new/product_hover.gif";
ProductCommands.prototype.convinceme_image = "images/cat_img/new/convinceme.gif";
ProductCommands.prototype.convincemeHover_image = "images/cat_img/new/convinceme_hover.gif";
ProductCommands.prototype.specification_image = "images/cat_img/new/specification.gif";
ProductCommands.prototype.specificationHover_image = "images/cat_img/new/specification_hover.gif";
ProductCommands.prototype.pdf_image = "images/cat_img/new/pdf.gif";
ProductCommands.prototype.pdfHover_image = "images/cat_img/new/pdf_hover.gif";
ProductCommands.prototype.buy_image = "images/cat_img/new/buy.gif";
ProductCommands.prototype.buyHover_image = "images/cat_img/new/buy_hover.gif";
ProductCommands.prototype.CurrentProductCommands = "";//this.LoadProductCommands(this.QueryString);
ProductCommands.prototype.ClearTimer = function(){
if (this.Timer != null){ clearTimeout(this.Timer); }
}
ProductCommands.prototype.ShowQuestion = function(){
this.ClearTimer();
var url = "AJAX/WizardSelector.aspx?product_id=" + CurrentProductID;
var xmlRequest = DoCallback(url, "");
if (xmlRequest.ResponseText.indexOf('WIZARD') > 0)
{
SetSource(url);
spaceRowVis();
LoadWizardCommands(CurrentProductID);
}
else
{
if (xmlRequest.ResponseText.indexOf('QUESTIONANSWERS') > 0)
{
url = "Catalog/Questions.aspx?product_id=" + CurrentProductID;
SetSource(url);
LoadQuestionCommands();
}
else
{
SetSource(url);
LoadCartCommands();
ShowCartButton();
}
}
}
ProductCommands.prototype.LoadProductCommands = function(queryString){
var xmlRequest = DoCallback("AJAX/ProductCommands.aspx", queryString);
var CurrentProductCommands = xmlRequest.ResponseText;
return CurrentProductCommands;
}
ProductCommands.prototype.LoadProductFiles = function(){
this.ClearTimer();
this.ClearMediaAndAudioFiles();
var src1 = "http://" + window.location.host + "/AJAX/ProductImageFiles.aspx?product_id=" + CurrentProductID;
window.frames["frame_ProductFiles"].location = src1;
var src2 = "http://" + window.location.host + "/AJAX/MediaSlideShow.aspx?product_id=" + CurrentProductID;
SetSourceWithCommands(src2);
LoadSlideShowCommands();
CycleFile();
}
ProductCommands.prototype.LoadConvinceMeFiles = function(){
this.ClearTimer();
this.ClearMediaAndAudioFiles();
var src = "http://" + window.location.host + "/AJAX/ProductMediaFiles.aspx?product_id=" + CurrentProductID;
window.frames["frame_ProductFiles"].location = src;
LoadSlideShowCommands();
this.CycleFile();
}
ProductCommands.prototype.LoadSpecificationFiles = function(){
this.ClearTimer();
this.ClearMediaAndAudioFiles();
var src = "http://" + window.location.host + "/AJAX/ProductDocumentFiles.aspx?product_id=" + CurrentProductID;
window.frames["frame_ProductFiles"].location = src;
LoadSlideShowCommands();
this.CycleFile();
}
ProductCommands.prototype.Product_AttachHandler = function(){
var Product = GetBrowserIndependentElement("img_product")
Product.src = simple_image;
Product.onmousedown  = function () {}
Product.onmouseenter  = function () {}
Product.onmouseleave  = function () {}
Product.onmousemove  = function () {}
Product.onmouseout  = function () {}
Product.onmouseover  = function () {}
Product.onmouseup = function () {}
Product.onmousedown = function () {roll_over('img_product','../Images/cat_img/new/product_hover.gif');}
Product.onmouseup = function () {roll_over('img_product','../Images/cat_img/new/product_simple.gif');}
Product.onmouseout = function () {roll_over('img_product','../Images/cat_img/new/product_simple.gif');}
Product.onclick = LoadProductFiles;
}
ProductCommands.prototype.ConvinceMe_AttachHandler = function(){
var ConvinceMe = GetBrowserIndependentElement("img_convinceme")
ConvinceMe.src = product_image;
ConvinceMe.onmousedown  = function () {}
ConvinceMe.onmouseenter  = function () {}
ConvinceMe.onmouseleave  = function () {}
ConvinceMe.onmousemove  = function () {}
ConvinceMe.onmouseout  = function () {}
ConvinceMe.onmouseover  = function () {}
ConvinceMe.onmouseup = function () {}
ConvinceMe.onmousedown = function () {roll_over('img_convinceme','../Images/cat_img/new/convince_hover.gif');}
ConvinceMe.onmouseup = function () {roll_over('img_convinceme','../Images/cat_img/new/convince.gif');}
ConvinceMe.onmouseout = function () {roll_over('img_convinceme','../Images/cat_img/new/convince.gif');}
ConvinceMe.onclick = LoadConvinceMeFiles;
}
ProductCommands.prototype.Specification_AttachHandler = function(){
var Specification = GetBrowserIndependentElement("img_specification")
Specification.src = simple_image;
Specification.onmousedown  = function () {}
Specification.onmouseenter  = function () {}
Specification.onmouseleave  = function () {}
Specification.onmousemove  = function () {}
Specification.onmouseout  = function () {}
Specification.onmouseover  = function () {}
Specification.onmouseup = function () {}
Specification.onmousedown = function () {roll_over('img_product','../Images/cat_img/new/product_hover.gif');}
Specification.onmouseup = function () {roll_over('img_product','../Images/cat_img/new/product_simple.gif');}
Specification.onmouseout = function () {roll_over('img_product','../Images/cat_img/new/product_simple.gif');}
Specification.onclick = this.LoadSpecificationFiles;
}
ProductCommands.prototype.ClearMediaAndAudioFiles = function(){
if (CurrentProductID != 0)
{
var _document = null;
try
{
_document = window.frames["frame_ProductFiles"].window.document;
if (_document != null)
{
window.frames["frame_ProductFiles"].MediaFiles = null;
window.frames["frame_ProductFiles"].AudioFiles = null;
}
}
catch(err){}
}
}
ProductCommands.prototype.LoadQuestionCommands = function(){
var xmlRequest = DoCallback("AJAX/QuestionCommands.aspx", "");
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.ResponseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
ProductCommands.prototype.LoadCartCommands = function(){
var xmlRequest = DoCallback("AJAX/CartCommands.aspx", "");
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.ResponseText;
}
ProductCommands.prototype.ShowCartButton = function(){
document.getElementById("img_cart").style.visibility = 'visible';
}
ProductCommands.prototype.HideCartButton = function(){
document.getElementById("img_cart").style.visibility = 'hidden';
}
ProductCommands.prototype.UnLoadCommands = function(){
document.getElementById("ACTIVECOMMANDS").style.visibility = 'hidden';
document.getElementById("ACTIVECOMMANDS").innerHTML = "";
if (this.CurrentProductID != 0)
{
var _document = null;
try
{
_document = window.frames["frame_ProductFiles"].window.document;
if (_document != null)
{
window.frames["frame_ProductFiles"].MediaFiles = null;
window.frames["frame_ProductFiles"].AudioFiles = null;
}
}
catch(err)
{
}
}
}

