function ProductCommands_FileSystem_Init()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = false;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "buy_simple.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "buy_hover.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init_Configure()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = false;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "configuresimple.jpg";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "configureover.jpg";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init_Buyer()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = false;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "BUYERSimple.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "BUYERHover.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init2()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = true;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "search_bt.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "search_bt2.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init3()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = true;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "buy_simple.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "buy_hover.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init4(ProductCategory)
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.WizardSelectorPage = "../AJAX/WizardSelector.aspx?product_id=" + this.CurrentProductID + "&ProductCategory=" + ProductCategory;
_ProductCommands.QuestionAnswersPage = "../Catalog/Questions.aspx?product_id=" + this.CurrentProductID + "&ProductCategory=" + ProductCategory;
_ProductCommands.ShoppingCartPage = "../Shopping/Cart.aspx?product_id=" + this.CurrentProductID + "&ProductCategory=" + ProductCategory;
_ProductCommands.ActivationProduct = false;
_ProductCommands.HRProduct = true;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "apply_now.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "apply_now_over.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init5()
{
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.WizardSelectorPage = "../AJAX/WorkflowProduct.aspx?product_id=" + this.CurrentProductID;
_ProductCommands.QuestionAnswersPage = "../Catalog/Questions.aspx?product_id=" + this.CurrentProductID;
_ProductCommands.ShoppingCartPage = "../Shopping/Cart.aspx?product_id=" + this.CurrentProductID;
_ProductCommands.ActivationProduct = false;
_ProductCommands.WorkflowProduct = true;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "workflow_product.jpg"
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "workflow_product.jpg";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function ProductCommands_FileSystem_Init_Booking() {
_ProductCommands = new ProductCommands(CurrentProductID);
_ProductCommands.ActivationProduct = false;
_ProductCommands.buy_image = switchFolder_ProductCommands() + "booking_simple.gif";
_ProductCommands.buyHover_image = switchFolder_ProductCommands() + "booking_hover.gif";
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
_ProductCommands.PDFFile_AttachHandler();
_ProductCommands.Buy_AttachHandler();
_ProductCommands.Load();
}
function GetComboValue(combo)
{
try
{
var selIndex = combo.selectedIndex;
var selValue = combo.options[selIndex].value;
var selText = combo.options[selIndex].text;
if (selValue != null)
{
return selValue;
}
}
catch(err)
{
return null;
}
}
function ProductCommands(productID)
{
this.CurrentResolution = function(){
if (GetUAgent() != "") {
return "250x250";
}
else{
if(catComView.toLowerCase() == "topper")
{
return "855x475";
}
else
{
return "1280x1024";
}
}
}
this.Common = new Common();
this.CurrentProductID = productID;
this.ActivationProduct = null;
this.HRProduct = null;
this.WorkflowProduct = null;
this.WorkflowProductMandatory = null;
this.WizardSelectorPage = "../AJAX/WizardSelector.aspx?product_id=" + this.CurrentProductID;
this.QuestionAnswersPage = "../Catalog/Questions.aspx?product_id=" + this.CurrentProductID;
this.ShoppingCartPage = "../Shopping/Cart.aspx?product_id=" + this.CurrentProductID;
this.PreActivationErrorPage = "../AJAX/PreActivationError.aspx?=" + this.CurrentProductID;
this.ContainerProductID = "container_product";
this.ContainerProduct = null;
this.productID = "img_product";
this.product_image = (switchFolder_ProductCommands() + "product.gif");
this.productHover_image = (switchFolder_ProductCommands() + "product_hover.gif");
this.ContainerConvinceMeID = "container_convinceme";
this.ContainerConvinceMe = null;
this.convincemeID = "img_convinceme";
this.convinceme_image = switchFolder_ProductCommands() + "convince_simple.gif";
this.convincemeHover_image = switchFolder_ProductCommands() + "convince_hover.gif";
this.specificationID = "img_specification";
this.specification_image = (switchFolder_ProductCommands() + "specification_simple.gif");
this.specificationHover_image = (switchFolder_ProductCommands() + "specification_hover.gif");
this.pdfID = "img_pdffile";
this.pdf_image = (switchFolder_ProductCommands() + "dwnload_simple.gif");
this.pdfHover_image = (switchFolder_ProductCommands() + "dwnload_hover.gif");
this.buyID = "img_buy";
this.buy_image = "";
this.buyHover_image = "";
this.SlideShowCommands = new SlideShowCommands();
this.ProductFilesFrames = function(){
return _ProductCommands.Common.GetBrowserIndependentElement("frame_ProductFilesFS");
}
this.MediaFilesSource = "../AJAX/ProductMediaFilesFS.aspx?product_id=";
this.IMPQuery = function(){
var QueryContainer = _ProductCommands.Common.GetBrowserIndependentElement("IMP_QUERYSTRING");
if (QueryContainer != null)
{
if (QueryContainer.innerText != "")
{
return "&" + escape(QueryContainer.innerText);
}
else
{
return "";
}
}
else
{
return "";
}
}
this.Load = function(){
_SlideShowCommands = _ProductCommands.SlideShowCommands;
if (_ProductCommands.ShowProductButton() == true) { return; }
if (_ProductCommands.ShowConvinceMeButton() == true) { return; }
}
this.ShowProductButton = function() {
_ProductCommands.ContainerProduct = _ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.ContainerProductID);
if (GetUAgentMainScript() != "") {
_ProductCommands.LoadProductFiles();
return true;
}
_ProductCommands.ContainerProduct.style.visibility = 'visible';
_ProductCommands.LoadProductFiles();
return true;
}
this.ShowConvinceMeButton = function() {
_ProductCommands.ContainerConvinceMe = _ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.ContainerConvinceMeID);
if (GetUAgentMainScript() != "") {
_ProductCommands.LoadConvinceMeFiles();
return true;
}
if (_ProductCommands.ContainerConvinceMe != null) {
if (_ProductCommands.ContainerConvinceMe.innerHTML != "") {
_ProductCommands.ContainerConvinceMe.style.visibility = 'visible';
_ProductCommands.LoadConvinceMeFiles();
return true;
}
}
}
this.LoadProductFiles = function() {
parent.PRODUCTCOMMAND_STATE = 0;
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.ClearMediaAndAudioFiles();
var src = _ProductCommands.MediaFilesSource + CurrentProductID + "&purpose=PRODUCT" + "&resolution=" + _ProductCommands.CurrentResolution() + uAgent;
_ProductCommands.LoadMediaAudioFiles(src);
_ProductCommands.ConvinceMe_AttachHandler();
_ProductCommands.Specification_AttachHandler();
if (GetUAgentMainScript() == "") {
_ProductCommands.ShowHideElement(_ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.convincemeID), _ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.productID));
}
}
this.LoadConvinceMeFiles = function() {
parent.PRODUCTCOMMAND_STATE = 1;
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.ClearMediaAndAudioFiles();
var src = _ProductCommands.MediaFilesSource + CurrentProductID + "&purpose=CONVINCEME" + "&resolution=" + _ProductCommands.CurrentResolution();
_ProductCommands.LoadMediaAudioFiles(src);
_ProductCommands.Product_AttachHandler();
_ProductCommands.Specification_AttachHandler();
if (GetUAgentMainScript() == "") {
_ProductCommands.ShowHideElement(_ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.productID), _ProductCommands.Common.GetBrowserIndependentElement(_ProductCommands.convincemeID));
}
}
this.LoadSpecificationFiles = function(){
parent.PRODUCTCOMMAND_STATE = 2;
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.ClearMediaAndAudioFiles();
_ProductCommands.Product_AttachHandler();
_ProductCommands.ConvinceMe_AttachHandler();
var src =  _ProductCommands.MediaFilesSource + CurrentProductID + "&purpose=SPECIFICATION" + "&resolution=" + _ProductCommands.CurrentResolution();
_ProductCommands.LoadMediaAudioFiles(src);
}
this.LoadPDFFiles = function(){
parent.PRODUCTCOMMAND_STATE = 3;
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.ClearMediaAndAudioFiles();
var src = _ProductCommands.MediaFilesSource + CurrentProductID + "&purpose=PDF" + "&resolution=" + _ProductCommands.CurrentResolution();
_ProductCommands.LoadMediaAudioFiles(src);
}
this.BuyProduct = function() {
hideFavRight();
hideHistoryRight();
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.ClearMediaAndAudioFiles();
if (_ProductCommands.ActivationProduct == true) {
_ProductCommands.LoadWizard_ForActivationProduct();
return;
}
else if (_ProductCommands.HRProduct == true) {
_ProductCommands.LoadWizard_ForHRProduct();
}
else if (_ProductCommands.WorkflowProduct) {
_ProductCommands.LoadWizard_ForWorkflowProduct();
}
else {
_ProductCommands.getExecuteCartResult();
if (GetUAgentMainScript() != "") {
buttonUp(CE);
}
}
if (navigator.userAgent.indexOf("Firefox") != -1) {
if (window.frames["frame_details"].location.href == "http://" + window.frames["frame_details"].location.host + "/Shopping/cart.aspx") {
parent.LoadCartCommands();
}
}
return;
}
this.getExecuteCartResult = function() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
var myDate = new Date();
var myTime = myDate.getTime();
req.open("GET", "../shopping/executecart.aspx?Productid=" + _ProductCommands.CurrentProductID + "&t=" + myTime, true);
req.onreadystatechange = function() {
var ready = req.readyState;
if (ready == 4) {
var result = req.responseText;
if (result.toLowerCase() == "yes") {
_ProductCommands.LoadWizard();
}
else {
ShowCartButton();
}
parent.GetShopCount();
}
}
}
req.send("");
}
this.Product_AttachHandler = function() {
var Product = this.Common.GetBrowserIndependentElement(_ProductCommands.productID);
if (Product != null) {
Product.src = _ProductCommands.product_image;
if (GetUAgent() != "") {
Product.onmousedown = function() { }
Product.onmouseenter = function() { }
Product.onmouseleave = function() { }
Product.onmousemove = function() { }
Product.onmouseout = function() { MM_swapImgRestore(); }
Product.onmouseover = function() { MM_swapImage(_ProductCommands.productID, '', _ProductCommands.productHover_image); }
Product.onmouseup = function() { }
Product.onmousedown = function() {  }
Product.onmouseup = function() { }
Product.onmouseout = function() {  }
}
else {
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(_ProductCommands.productID, _ProductCommands.productHover_image); }
Product.onmouseup = function() { roll_over(_ProductCommands.productID, _ProductCommands.product_image); }
Product.onmouseout = function() { roll_over(_ProductCommands.productID, _ProductCommands.product_image); }
}
Product.onclick = this.LoadProductFiles;
}
}
this.ConvinceMe_AttachHandler = function() {
var ConvinceMe = this.Common.GetBrowserIndependentElement(_ProductCommands.convincemeID);
if (ConvinceMe != null) {
ConvinceMe.src = _ProductCommands.convinceme_image;
if (GetUAgent() != "") {
ConvinceMe.onmousedown = function() { }
ConvinceMe.onmouseenter = function() { }
ConvinceMe.onmouseleave = function() { }
ConvinceMe.onmousemove = function() { }
ConvinceMe.onmouseout = function() { MM_swapImgRestore(); }
ConvinceMe.onmouseover = function() { MM_swapImage(_ProductCommands.convincemeID, '', _ProductCommands.convincemeHover_image); }
ConvinceMe.onmouseup = function() { }
ConvinceMe.onmousedown = function() { }
ConvinceMe.onmouseup = function() { }
ConvinceMe.onmouseout = function() { }
}
else {
ConvinceMe.onmousedown = function() { }
ConvinceMe.onmouseenter = function() { }
ConvinceMe.onmouseleave = function() { }
ConvinceMe.onmousemove = function() { }
ConvinceMe.onmouseout = function() { }
ConvinceMe.onmouseover = function() { }
ConvinceMe.onmouseup = function() { }
ConvinceMe.onmousedown = function() { }
ConvinceMe.onmouseup = function() { }
ConvinceMe.onmouseout = function() { }
}
ConvinceMe.onclick = this.LoadConvinceMeFiles;
}
}
this.Specification_AttachHandler = function() {
var Specification = this.Common.GetBrowserIndependentElement(_ProductCommands.specificationID);
if (Specification != null) {
Specification.src = _ProductCommands.specification_image;
if (GetUAgent() != "") {
Specification.onmousedown = function() { }
Specification.onmouseenter = function() { }
Specification.onmouseleave = function() { }
Specification.onmousemove = function() { }
Specification.onmouseout = function() { MM_swapImgRestore();}
Specification.onmouseover = function() { MM_swapImage(_ProductCommands.specificationID, '', _ProductCommands.specificationHover_image); }
Specification.onmouseup = function() { }
Specification.onmousedown = function() { }
Specification.onmouseup = function() {  }
Specification.onmouseout = function() {  }
}
else {
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(_ProductCommands.specificationID, _ProductCommands.specificationHover_image); }
Specification.onmouseup = function() { roll_over(_ProductCommands.specificationID, _ProductCommands.specification_image); }
Specification.onmouseout = function() { roll_over(_ProductCommands.specificationID, _ProductCommands.specification_image); }
}
Specification.onclick = this.LoadSpecificationFiles;
}
}
this.PDFFile_AttachHandler = function() {
var PDFFile = this.Common.GetBrowserIndependentElement(_ProductCommands.pdfID);
if (PDFFile != null) {
PDFFile.src = _ProductCommands.pdf_image;
if (GetUAgent() != "") {
PDFFile.onmousedown = function() { }
PDFFile.onmouseenter = function() { }
PDFFile.onmouseleave = function() { }
PDFFile.onmousemove = function() { }
PDFFile.onmouseout = function() { MM_swapImgRestore(); }
PDFFile.onmouseover = function() { MM_swapImage(_ProductCommands.pdfID, '', _ProductCommands.pdfHover_image); }
PDFFile.onmouseup = function() { }
PDFFile.onmousedown = function() { }
PDFFile.onmouseup = function() { }
PDFFile.onmouseout = function() { }
}
else {
PDFFile.onmousedown = function() { }
PDFFile.onmouseenter = function() { }
PDFFile.onmouseleave = function() { }
PDFFile.onmousemove = function() { }
PDFFile.onmouseout = function() { }
PDFFile.onmouseover = function() { }
PDFFile.onmouseup = function() { }
PDFFile.onmousedown = function() { roll_over(_ProductCommands.pdfID, _ProductCommands.pdfHover_image); }
PDFFile.onmouseup = function() { roll_over(_ProductCommands.pdfID, _ProductCommands.pdf_image); }
PDFFile.onmouseout = function() { roll_over(_ProductCommands.pdfID, _ProductCommands.pdf_image); }
}
PDFFile.onclick = this.LoadPDFFiles;
}
}
this.Buy_AttachHandler = function() {
var Buy = this.Common.GetBrowserIndependentElement(_ProductCommands.buyID);
if (Buy != null) {
Buy.src = _ProductCommands.buy_image;
if (GetUAgent() != "") {
Buy.onmousedown = function() { }
Buy.onmouseenter = function() { }
Buy.onmouseleave = function() { }
Buy.onmousemove = function() { }
Buy.onmouseout = function() { MM_swapImgRestore(); }
Buy.onmouseover = function() { MM_swapImage(_ProductCommands.buyID, '', _ProductCommands.buyHover_image); }
Buy.onmousedown = function() { }
Buy.onmouseout = function() { }
}
else {
Buy.onmousedown = function() { }
Buy.onmouseenter = function() { }
Buy.onmouseleave = function() { }
Buy.onmousemove = function() { }
Buy.onmouseout = function() { }
Buy.onmouseover = function() { }
Buy.onmousedown = function() { roll_over(_ProductCommands.buyID, _ProductCommands.buyHover_image); }
Buy.onmouseup = function() {
roll_over(_ProductCommands.buyID, _ProductCommands.buy_image);
}
Buy.onmouseout = function() { roll_over(_ProductCommands.buyID, _ProductCommands.buy_image); }
}
Buy.onmouseup = catchEvent
Buy.onclick = this.BuyProduct;
}
}
this.ClearMediaAndAudioFiles = function(){
if (CurrentProductID != 0)
{
var _document = null;
try
{
_document = _ProductCommands.ProductFilesFrames.window;
if (_document != null)
{
_ProductCommands.ProductFilesFrames.MediaFiles = null;
_ProductCommands.ProductFilesFrames.AudioFiles = null;
}
}
catch(err){}
}
}
this.LoadWizard = function(){
this.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1)
{
_ProductCommands.Common.SetSource(_ProductCommands.WizardSelectorPage + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0)
{
_ProductCommands.Common.SetSource(_ProductCommands.WizardSelectorPage + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else
{
_ProductCommands.Common.SetSource(_ProductCommands.WizardSelectorPage + this.IMPQuery());
}
_ProductCommands.LoadWizardCommands(_ProductCommands.CurrentProductID);
}
this.LoadWizard_ForActivationProduct = function(arg, SearchName) {
try {
var _Document;
var domainName;
try {
_Document = window.frames['frame_details'].document;
domainName = _ProductCommands.Common.GetBrowserIndendentElementForDocument(_Document, 'domainName').value;
}
catch (err) { }
var companyName;
if (ptype == "" && CFname == "") {
try {
_Document = window.frames['frame_details'].document;
companyName = _ProductCommands.Common.GetBrowserIndendentElementForDocument(_Document, 'companyName').value;
}
catch (err) { }
}
else {
companyName = CFname;
}
var required_name;
try {
_Document = window.frames['frame_details'].document;
required_name = _ProductCommands.Common.GetBrowserIndendentElementForDocument(_Document, 'ocName').value;
}
catch (err) { }
var requiredVATname;
try {
_Document = window.frames['frame_details'].document;
requiredVATname = _ProductCommands.Common.GetBrowserIndendentElementForDocument(_Document, 'RequiredVATName').value;
}
catch (err) { }
var skipWizard;
try { skipWizard = window.frames['frame_details'].document.getElementById('skipWizard').value; }
catch (err) { }
var readymadeCompany;
try { readymadeCompany = window.frames['frame_details'].document.getElementById('readymadeCompany').value; }
catch (err) { }
var readymadeDomain;
try { readymadeDomain = window.frames['frame_details'].document.getElementById('readymadeDomain').value; }
catch (err) { }
if (domainName == null && companyName == null && required_name == null && requiredVATname == null && skipWizard == null && readymadeCompany == null && readymadeDomain == null) {
parent.ShowHideProductCommands('Product', parent.CurrentProductID, '?product_id=' + parent.CurrentProductID, null, 'search');
return;
}
if (domainName != null) {
var domainPattern = new RegExp("^[a-zA-Z0-9\-]+$");
if (domainName.match(domainPattern) == null) {
window.alert("Please Enter Valid Domain Name!");
return;
}
else {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + domainName + this.IMPQuery());
}
return;
}
}
if (companyName != null) {
if (companyName == null || companyName == "") {
window.alert("Please Enter Valid Company Name!");
return;
}
else {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + companyName + this.IMPQuery() + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + companyName + this.IMPQuery() + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + companyName + this.IMPQuery());
}
return;
}
}
if (required_name != null) {
var required_type = _ProductCommands.Common.GetBrowserIndendentElementForDocument(_Document, 'ocType').value;
if (required_name == null || required_name == "") {
window.alert("Please Enter Valid Company Name!");
return;
}
else {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + required_name + '&required_type=' + required_type + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + required_name + '&required_type=' + required_type + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + required_name + '&required_type=' + required_type + this.IMPQuery());
}
return;
}
}
if (requiredVATname != null) {
if (requiredVATname == null || requiredVATname == "") {
window.alert("Please Enter A Valid Name!");
return;
}
else {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + requiredVATname + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + requiredVATname + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&required_name=' + requiredVATname + this.IMPQuery());
}
return;
}
}
if (skipWizard != null) {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&LinkCode=' + skipWizard + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&LinkCode=' + skipWizard + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&LinkCode=' + skipWizard + this.IMPQuery());
}
return;
}
if (readymadeCompany != null) {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeCompany=' + readymadeCompany + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeCompany=' + readymadeCompany + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeCompany=' + readymadeCompany + this.IMPQuery());
}
return;
}
if (readymadeDomain != null) {
_ProductCommands.SlideShowCommands.ClearTimer();
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeDomain=' + readymadeDomain + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeDomain=' + readymadeDomain + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + this.IMPQuery());
}
else {
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, '&readymadeDomain=' + readymadeDomain + this.IMPQuery());
}
return;
}
}
catch (err) { }
}
this.LoadWizardCommands = function(CurrentProductID){
var xmlRequest = DoCallback(_Domain + "/AJAX/WizardCommands.aspx", "?product_id=" + productID);
if (xmlRequest != null)
{
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").style.visibility = 'visible';
}
}
this.LoadQuestionCommands = function(){
var myDate = new Date();
var myTime = myDate.getTime();
var xmlRequest = DoCallback("../AJAX/QuestionCommands.aspx?t=" + myTime, "");
if (xmlRequest != null )
{
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").style.visibility = 'visible';
}
}
this.LoadCartCommands = function(){
var xmlRequest = DoCallback("../AJAX/CartCommands.aspx", "");
if (xmlRequest != null)
{
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").style.visibility = 'visible';
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
}
}
this.LoadDomainRegistrationCommands = function(){
var xmlRequest = DoCallback("../AJAX/Commands_DomainRegistration.aspx", "");
if (xmlRequest != null)
{
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").style.visibility = 'visible';
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
}
}
this.ShowCartButton = function(){
this.Common.GetBrowserIndependentElement("img_cart").style.visibility = 'visible';
}
this.HideCartButton = function(){
this.Common.GetBrowserIndependentElement("img_cart").style.visibility = 'hidden';
}
this.UnLoad = function(){
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").style.visibility = 'hidden';
this.Common.GetBrowserIndependentElement("ACTIVECOMMANDS").innerHTML = "";
this.ClearMediaAndAudioFiles();
}
this.LoadMediaAudioFiles = function (src){
try
{
_ProductCommands.ProductFilesFrames().src = src;
}
catch(exp)
{
}
}
this.ShowHideElement = function(elementToShow, elementToHide){
if(elementToHide != null)
{
elementToHide.height = "0";
elementToHide.width = "0";
}
if(elementToShow != null)
{
elementToShow.height = switchSize("ShowHideElement",107,25)["height"];
elementToShow.width = switchSize("ShowHideElement",107,25)["width"];
}
}
this.LoadWizard_ForHRProduct = function (){
try
{
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, this.IMPQuery());
UnLoadCommands();
return;
}
catch(exp)
{
}
}
this.LoadWizard_ForWorkflowProduct = function (){
try
{
_ProductCommands.SlideShowCommands.ClearTimer();
_ProductCommands.Common.SetSource_WithParams(_ProductCommands.WizardSelectorPage, this.IMPQuery());
UnLoadCommands();
return;
}
catch(exp)
{
window.alert(exp.toString());
}
}
}
function TrapFrameEvent(evt)
{
if (evt == null || evt != false)
{
_SlideShowCommands.Load();
}
}
function switchFolder_ProductCommands() {
if (GetUAgentMainScript() != "") {
return "../wap_images/Buttons/";
}
else {
return "../images/cat_img/new/";
}
}
function switchSize(funcName, w, h) {
var sizeOf = new Array();
switch (funcName) {
case "ShowHideElement":
if (GetUAgentMainScript() != "") {
sizeOf["width"] = 50; //101;
sizeOf["height"] = 50;  //31;
}
else {
sizeOf["width"] = w;
sizeOf["height"] = h;
}
return sizeOf;
break;
}
}
var CE;
function BrowserCheck() {
var b = navigator.appName;
if (b == "Netscape") this.b = "NS";
else if (b == "Microsoft Internet Explorer") this.b = "IE";
else this.b = b;
this.v = parseInt(navigator.appVersion);
this.NS = (this.b == "NS" && this.v >= 4);
this.NS4 = (this.b == "NS" && this.v == 4);
this.NS5 = (this.b == "NS" && this.v == 5);
this.IE = (this.b == "IE" && this.v >= 4);
this.IE4 = (navigator.userAgent.indexOf('MSIE 4') > 0);
this.IE5 = (navigator.userAgent.indexOf('MSIE 5') > 0);
if (this.IE5 || this.NS5) this.VER5 = true;
if (this.IE4 || this.NS4) this.VER4 = true;
this.OLD = (!this.VER5 && !this.VER4) ? true : false;
this.min = (this.NS || this.IE);
}
is = new BrowserCheck();
if (GetUAgent() != "") {
var  iter = 0;
var  setId = 0;
var  down = true;
var  up = false;
var  bouncingBall = (is.VER5) ? document.getElementById("ball").style
: (is.NS) ? document.layers["ball"]
: document.all["ball"].style;
var  stillBall = (is.VER5) ? document.getElementById("staticBall").style
: (is.NS) ? document.layers["staticBall"] : document.all["staticBall"].style;
var  winH = (is.NS) ? window.innerHeight - 55 : document.body.offsetHeight - 55;
}
if (is.NS4)document.captureEvents(Event.MOUSEUP);
function catchEvent(e) {
CE = e;
}
function buttonUp(e) {
try {
winH = document.body.offsetHeight;
if (setId != 0) {
clearInterval(setId);
}
bouncingBall.display = "block";
stillBall.display = "none";
bouncingBall.left = (is.NS) ? e.pageX - 15 : event.clientX - 10;
bouncingBall.top = (is.NS) ? e.pageY - 15 : event.clientY - 40;
iter = 0;
setId = setInterval("generateGravity()", 20);
return true;
} catch (ex) {
}
}
function generateGravity() {
if ((parseInt(bouncingBall.top) + iter < winH) && down) {
bouncingBall.top = parseInt(bouncingBall.top) + iter;
iter++;
return;
}
else {
if ((parseInt(bouncingBall.top) < winH) && down) {
bouncingBall.top = winH + 10;
bouncingBall.display = "none";
return;
}
down = false;
up = false;
if (iter < 0 && parseInt(bouncingBall.top) > winH) {
clearInterval(setId);
bouncingBall.display = "none";
stillBall.display = "block";
setId = 0;
}
if (parseInt(bouncingBall.top) > 0 && up && iter >= 0) {
bouncingBall.top = parseInt(bouncingBall.top) - iter;
iter--;
if (iter % 3 == 0) iter--;
return;
}
down = true;
up = false;
}
}

