var StackCateCache = "";
var xType = "";
var xParams = "";
var x_Url = "";
var x2Params = ""; /// <reference path="preInit.js" />
var x2_Url = "";
var stackLevel = 0;
var stackParms = [];
var level;
var CategorySearchAtInfiniview = true;
var iPhonePathCat = "";
var RelatedViewChkr = false;
var PRODUCTCOMMAND_STATE = 0;
var WizCtrlName = "PRODUCTCONFIGWIZARD";
var WizardLevelCount = 0;
var _Domain = "http://" + window.location.host;
var GetiViewSource;
var CheckGetView = true;
var fullScreenImage;
var fullScreenIframeSrc;
var InfiniOfficePage = "http://" + window.location.host + "/AJAX/InfiniOffice.aspx";
var EQuotePage = "http://" + window.location.host + "/AJAX/eQuoteProducts.aspx";
var EbayPage = "http://" + window.location.host + "/AJAX/ebay.aspx";
var catPlusPic, catMinusPic;
var mainPagePic;
var onMouseOverCatbkgd, onMouseOutCatbkgd, onClickCatBkgd;
var loadPagesImage;
var topCategory, leftCategory;
var SetRelative = '1';
var timer;
var sliderTimer;
var TimeToWaitForFilesToLoad = 1;
var CycleFileDelay = 20;
var MuteState;
var mute_image = "../images/sound.gif";
var sound_image = "../images/mute.gif";
var CurrentProductPrice = "0.00";
var CurrentSlideShow = 0;
var product_image = "../images/cat_img/new/product.gif";
var simple_image = "../images/cat_img/new/convince_simple.gif";
var framLoading;
var relatedProductLength = new Array(0);
var currentRelatedProduct;
var relatedPro_ParentID; // Created on 10 August for temp related Parent product
var homePagebanner_Process1;
var homePagebanner_Process2;
var USE_DATABASE_PRODUCTCOMMANDS = false;
var USE_FILESYSTEM_PROUDCTCOMMANDS = true;
var productCmdQuerry;
var currentRelatedProId;
var catloadChecker, advertisementChecker, bannerChecker;
var _wizardGlobalChk;
var _relatedresultchk;
var _resWizardPro;
var BackProImg = "ProImginit";
var lastRowId, lastRowFontId; 	//	Crea ted on 14 November 2007 for new updation last row activation.
var fullDomainName = ""; 	// used to preserver the complete domain name
var redirectURL;
var category_Loading;
var framehistory;
var navigateToHome = false;
var horizontalDefaultCat;
var Comp_URL;
var Comp_URL_Fav;
var URL_Fav;
var addtoLayout;
var addtoMethod;
var AddURL;
var AddTitle;
var Pro_NewID;
var dom;
var ns4;
var present;
var imgchkHistory, imgchkHistoryId;
var MouseOver_DisableEnable;
var currentCenterImage;
var clikedMouseOver;
var PreviewControl = false;
clikedMouseOver = null;
MouseOver_DisableEnable = "True";
imgchkHistory = 0;
imgchkHistoryId = null;
present = "h_contectFirst";
dom = document.getElementById ? 1 : 0;
ns4 = document.layers ? 1 : 0;
horizontalDefaultCat = 1;
framehistory = "undefined";
mainPagePic = switchStringForIPhone("../Images_Private/Main_Image/main.html", "");
catPlusPic = switchStringForIPhone('../images/b4l_s_plus.gif', '../wap_images/b4l_s_plus.gif');
catMinusPic = switchStringForIPhone('../images/b4l_s_minus.gif', '../wap_images/b4l_s_minus.gif');
onMouseOverCatbkgd = "CatHoverBGColor"; 	// Categories OnMouseOver background color
onMouseOutCatbkgd = "CatMouseOutBGColor"; 	// Categories OnMouseOut background color
onClickCatBkgd = 'CatClickBGColor'; //'#D0D0D0';			// Categories OnMouseClick background color
var loadPagesImageCenter = "<img src='../images/ProgressBar.gif' border='0' vAlign='middle' align='center' />"; // image shows while data loaded
var loadPagesImage = "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='LoadingText'><img src='../images/blank.gif' border='0' width='5' height='5' vAlign='middle' align='center' /></td></tr><tr><td align='center' valign='top'>" + loadPagesImageCenter + "</td></tr></table>";
topCategory = 0;
leftCategory = 0;
catloadChecker = "Process";
advertisementChecker = "Done";
bannerChecker = "Done";
frameLoading = "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='LoadingText'>Loading..</td></tr><tr><td align='center' valign='top'>" + loadPagesImageCenter + "</td></tr></table>";
homePagebanner_Process1 = "Process";
homePagebanner_Process2 = "Process";
_resWizardPro = "";
redirectURL = "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='LoadingText'>Redirecting in Process. ..</td></tr></table>";
var GlobalMpQuery;
var sldbox;
function MarketPlace_CheckOut() {
var url = "http://" + window.location.host + "/BestOffer/PurchasedOrder.aspx" + GlobalMpQuery;
SetSource(url);
}
function RedirectPlaceBid() {
src = "http://" + window.location.host + "/Specialize/PlaceControllBidBid.aspx" + GlobalMpQuery;
SetSource(src);
}
function ApprovedSupplier() {
var url = "http://" + window.location.host + "/MP_AJAX/MP_PlaceBid.aspx" + window.location.search + '&mp_approved=approved';
parent.SetSrc(url);
}
function RedirectPlaceBestOfferBid() {
var PQnty = document.getElementById('lbl_quantity').innerText;
var NPrice = document.getElementById('new_offer').value;
var qstring = "new_offer=" + NPrice + "&purchased_quantity=" + PQnty;
var url = "http://" + window.location.host + "/MP_AJAX/MP_PlaceBid.aspx" + GlobalMpQuery + "&" + qstring;
SetSource(url);
}
function GetMP_ProductDetails(Query) {
GlobalMpQuery = Query;
var url = "http://" + window.location.host + "/MP_AJAX/MP_ProductDetails.aspx" + Query;
var xmlRequest = DoCallback(url, "");
if (xmlRequest) {
var str = xmlRequest.responseText;
var MyDiv = document.getElementById('ACTIVECOMMANDS');
MyDiv.style.visibility = 'visible';
MyDiv.innerHTML = str;
}
else {
var MyDiv = document.getElementById('ACTIVECOMMANDS');
MyDiv.style.VISIBILITY = 'visible';
MyDiv.innerHTML = str;
}
}
function updatetotal() {
var txt1 = document.getElementById('new_offer');
var txt2 = document.getElementById('lbl_quantity').innerText; //document.getElementById('Purchase_Quantity');
var Result = Number(txt1.value) * Number(txt2);
document.getElementById('total_price').value = Result;
}
function BestOfferBid() {
var url = "http://" + window.location.host + "/MP_AJAX/MP_ProductDetails.aspx" + GlobalMpQuery + "&placebid=true";
var xmlRequest = DoCallback(_Domain + "/" + url, "");
if (xmlRequest) {
var str = xmlRequest.responseText;
if (str == 'NOTLOGIN') {
SetSource('/MP_AJAX/MP_bid.aspx' + GlobalMpQuery);
}
else {
PlaceBestOfferBid();
}
}
else {
}
}
function popwindiw() {
document.window.open("https://www.infinishops.com/popup_blck.aspx", "_blank");
}
var currentImageNo = 0;
var supportURL;
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start)
if (c_end == -1) c_end = document.cookie.length
return unescape(document.cookie.substring(c_start, c_end))
}
}
return ""
}
function setCookie(c_name, value, expiredays) {
var exdate = new Date()
exdate.setMinutes(exdate.getMinutes() + expiredays)
document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + exdate.toGMTString())
}
function checkCookie() {
username = getCookie('username')
if (username != null && username != "") {
return;
}
else {
username = "http://www.infinibot.com/index.php?greeting=helloinfinishops"
url = "http://www.infinibot.com/index.php?greeting=helloinfinishops";
delay = 3600;    // time in seconds before popup opens
timer = setTimeout("Start(url)", delay * 1000000);
if (username != null && username != "") {
setCookie('username', username, 8)
}
}
}
var closetime = 0; // Close window after __ number of seconds?
function Start(URL) {
preview = window.open(URL, 'mywindow');
if (closetime) setTimeout("preview.close();", closetime * 1000);
}
var srchTopvar; 	// Var for search result top layer visble
var simpleTopVar; // Var for simple result top layer visble
srchTopvar = "hide";
simpleTopVar = "hide";
function roll_over(img_name, img_src) {
try {
document.getElementById(img_name).src = img_src;
} catch (e) { }
}
function MM_reloadPage(init) {
if (init == true) with (navigator) {
if
((appName == "Netscape") && (parseInt(appVersion) == 4)) {
document.MM_pgW = innerWidth;
document.MM_pgH = innerHeight;
var onresize = MM_reloadPage;
}
}
else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
function spaceRow() {
}
function FavSpaceRowVis() {
if (document.getElementById("ACTIVECOMMANDS").innerHTML == "") {
document.getElementById("rowspace").innerHTML = "<img src='../images\blank.gif' width='1' height='9' />";
}
else if (document.getElementById("ACTIVECOMMANDS").innerHTML != "") {
return;
}
}
function spaceRowVis() {
if (timer != null) {
stop();
}
}
function spaceRowVisBuy() {
if (timer != null) {
stop();
}
if (document.getElementById("rowspace").innerHTML == "") {
document.getElementById("rowspace").innerHTML = "<img src='../images\blank.gif' width='1' height='33' />";
}
else {
}
}
var ProAlert;
var FavproductId;
var FavProType;
FavproductId = "";
ProAlert = 0;
function favSel() {
var xmlRequest = DoCallback(_Domain + "/Customer/AddFavourite.aspx?product_id=" + FavproductId + "&add=" + FavProType, "")
if (xmlRequest.responseText == "Log_error") {
SetSource("../Customer/Home.aspx");
document.getElementById("AddFavRes").innerHTML = "<span class='text13'>Your are not logged In</span>";
}
else {
}
this.favProductRender();
}
function noFavSel() {
alert("No Product selected");
}
function renderFavouriteBar() {
FrameSize('');
var xmlRequest = DoCallback(_Domain + "/AJAX/Favourites.aspx", "");
document.getElementById("FavouriteProductDiv").innerHTML = "";
if (xmlRequest.responseText == "Log_error") {
SetSource("../Customer/Home.aspx");
document.getElementById("FavouriteProductDiv").innerHTML = "<span class='text13'>Your are not logged In</span>";
}
else {
document.getElementById("FavouriteProductDiv").innerHTML = xmlRequest.responseText;
}
}
function renderHistoryBar() {
var xmlRequest = DoCallback(_Domain + "/AJAX/History.aspx", "");
document.getElementById("HistoryResult").innerHTML = "";
if (xmlRequest.responseText == "Log_error") {
document.getElementById("HistoryResult").innerHTML = "<span class='text13'>Your are not logged In</span>";
}
else {
document.getElementById("HistoryResult").innerHTML = xmlRequest.responseText;
}
}
function showMenuFav() {
}
function hideMenuFav() {
}
function FavProductDel(RemoveFlag, FavProId) {
var xmlRequest = DoCallback(_Domain + "/Customer/AddFavourite.aspx?product_id=" + FavProId + "&remove=" + RemoveFlag, "");
favProductRender();
}
var dom = document.getElementById ? 1 : 0;
var ns4 = document.layers ? 1 : 0;
var present;
var srchVal;
srchVal = 0;
var onResize = loadAgain;
function resResvalChng() {
}
function MM_changeProp(objName, x, theProp, theValue) {
var obj = MM_findObj(objName);
if (obj && (theProp.indexOf("style.") == -1 || obj.style)) {
if (theValue == true || theValue == false)
eval("obj." + theProp + "=" + theValue);
else
eval("obj." + theProp + "='" + theValue + "'");
}
}
function MM_findObj(n, d) {
var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
}
if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
if (!x && d.getElementById) x = d.getElementById(n); return x;
}
function loadAgain() {
if (ns4)
self.location.reload();
}
function initArrow(layerId) {
try {
var tablename;
if (layerId == "content") {
tablename = "first";
}
else if (layerId == "contentTop") {
tablename = "SecondTop";
}
else if (layerId == "reletedProducts") {
tablename = "relpro";
}
else if (layerId == "searchRes") {
tablename = "srchres";
}
else if (layerId == "MainCatTop") {
tablename = "maincatcontain";
}
else if (layerId == "FavProducts") {
tablename = "FavPro";
}
else if (layerId == "HistoryProducts") {
tablename = "HistoryPro";
}
if (dom) {
if (tablename == "first") {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
else if (tablename == "srchres") {
try {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
catch (ex) { }
}
else if (tablename == "FavPro") {
try {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
catch (ex) { }
}
else if (tablename == "HistoryPro") {
try {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
catch (ex) { }
}
else if (tablename == "relpro") {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
else if (tablename == "maincatcontain") {
layer = document.getElementById(layerId).getElementsByTagName("table");
layer[tablename].style.visibility = "visible";
layer[tablename].style.top = 0;
}
}
else if (ns4) {
layer = "document['content'].document";
eval(layer + "[tablename]" + '.visibility = "visible"');
eval(layer + "[tablename]" + '.top = -15');
}
}
catch (err) {
}
}
function change(page) {
if (dom) {
layer[present].style.visibility = "hidden";
layer[page].style.visibility = "visible";
layer[page].style.top = 0;
}
else if (ns4) {
eval(layer + "[present]" + '.visibility = "hidden"');
eval(layer + "[page]" + '.visibility = "visible"');
eval(layer + "[page]" + '.top = -15');
}
present = page;
}
function scrollq(direction, speed, divname) {
if (divname == "content") {
present = "first";
}
else if (divname == "contentTop") {
present = "SecondTop";
}
else if (divname == "searchRes") {
present = "srchres";
}
else if (divname == "MainCatTop") {
present = "maincatcontain";
}
else if (divname == "reletedProducts") {
present = "relpro";
}
else if (divname == "FavProducts") {
present = "FavPro";
}
else if (divname == "HistoryProducts") {
present = "HistoryPro";
}
if (dom) {
layer = document.getElementById(divname).getElementsByTagName("table");
var layertop = parseInt(layer[present].style.top + 5);
var scrollheight = (document.getElementById(divname).offsetHeight - layer[present].offsetHeight);
}
else if (ns4) {
var layertop = parseInt(document[divname].document[present].top);
var scrollheight = (document[divname].clip.height - document[divname].document[present].clip.height);
}
if (direction == "down" && layertop - 1 > scrollheight) {
if (dom) {
layer[present].style.top = (layertop - speed) + "px";
}
else if (ns4)
document[divname].document[present].top = (layertop - speed);
}
else if (direction == "up" && layertop < -1) {
if (dom) {
layer[present].style.top = (layertop + speed) + "px";
}
else if (ns4)
document[divname].document[present].top = (layertop + speed);
}
timer = setTimeout("scrollq('" + direction + "', " + speed + ",'" + divname + "')", 10);
}
function stop() {
clearTimeout(timer);
}
var secCatRes;
var showRow, showRowFourthLvl;
var imgchk, imgchksec;
showRow = 0;
imgchk = 0;
imgchksec = 0;
showRowFourthLvl = 0;
function favlink() {
var fav;
fav = "<a href='#' class='link-link11'>Add to fav</a>";
document.getElementById('addfavlink').style.display = "block";
document.getElementById('addfavlink').innerHTML = fav;
}
function pluschange(imID, roid) {
if (GetUAgentMainScript() != 'MSIE') {
if (document.getElementById(roid).style.visibility == 'visible') {
var img = document.getElementById(imID);
var urlName;
img.src = catMinusPic;
imgchk = 1;
}
else if (document.getElementById(roid).style.visibility == 'hidden') {
var img = document.getElementById(imID);
var urlName;
img.src = catPlusPic;
imgchk = 0;
}
}
}
function pluschangeSec(src, thrId) {
if (GetUAgentMainScript() != 'MSIE') {
if (document.getElementById(thrId).style.visibility == 'visible') {
var img = document.getElementById(src);
var urlName;
urlName = window.location.href;
var imgLoc = urlName + catMinusPic;
imgLoc = imgLoc.replace("#", "");
img.src = imgLoc;
}
else if (document.getElementById(thrId).style.visibility == 'hidden') {
var img = document.getElementById(src);
var urlName;
urlName = window.location.href;
var imgLoc = urlName + catPlusPic;
imgLoc = imgLoc.replace("#", "");
img.src = imgLoc;
}
}
}
function showThrdRow() {
}
function hideFourthTable() {
f1 = document.getElementById("CatResFuorth");
f1.style.display = "none";
}
function showFourthTable() {
f = document.getElementById("CatResFuorth");
f.style.display = "block";
}
function hideCatTable() {
f = document.getElementById("CatRes");
f.style.display = "none";
}
function hideAllRight() {
document.getElementById("FavouriteProductDiv").style.display = "none";
document.getElementById("DIV_LIST").style.display = "none";
document.getElementById("RelatedProductDiv").style.display = "none";
document.getElementById("HistoryProductDiv").style.display = "none";
document.getElementById("CompareProductDiv").style.display = "none";
}
function hideFavRight() {
if (document.getElementById("FavouriteProductDiv").style.display == "block") {
document.getElementById("FavouriteProductDiv").style.display = "none";
document.getElementById("favBarView").src = "../images/favourite.jpg";
}
}
function CatLoadCaller() {
if (catComView == "topper") {
catloadChecker = "Done";
checkMainInterFace();
}
else {
sldbox = 1;
document.getElementById("catBall").innerHTML = loadPagesImage;
var req = null;
req = initXMLHTTPRequest();
if (req) {
if (GetUAgentMainScript() != "") {
req.open("GET", "Catalog/NewCatPageDis.aspx?iphone=true", true);
}
else {
req.open("GET", "Catalog/NewCatPageDis.aspx", true);
}
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
document.getElementById("DIV_LIST").innerHTML = "";
document.getElementById("DIV_LIST").innerHTML = req.responseText;
document.getElementById("catBall").innerHTML = "";
catloadChecker = "Done";
checkMainInterFace();
myMainCategoryMoving();
}
else {
document.getElementById("catBall").innerHTML = loadPagesImage;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
SetObjectSize("DIV_LIST", 220, 314);
}
SetSource(mainPagePic);
if (!navigateToHome == true) {
if (window.location.search.length > 0) {
var query_new = window.location.search.substring(1);
var vars = query_new.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == "ProURL_ID" || pair[0] == "prourl_id") {
myMainCategoryMoving();
NavigateToProductFromSupport(pair[1]);
}
}
if (CheckEQuoteQueryString() == true) { return; }
if (CheckWorkflowQueryString() == true) { return; }
var urlQuery = window.location.search;
GlobalMpQuery = urlQuery;
var MP_Query = queryString("Query")
if (MP_Query == 'bestoffer') {
MP_Query = '\BestOffer/Default.aspx' + urlQuery;
parent.document.getElementById('frame_details').src = MP_Query;
var MyDiv = document.getElementById('ACTIVECOMMANDS');
MyDiv.style.visibility = 'visible';
MyDiv.innerHTML = '<img src=../Images/pro-2-chkout.jpg onClick=MarketPlace_CheckOut("checkout") /> ';
downslide();
}
else if (MP_Query == 'imp_cart') {
var QueryType = queryString("Query");
var type = queryString("type");
var mp_id = queryString("mp_id");
var merchant_product_id = queryString("merchant_product_id");
var mp_product_id = queryString("mp_product_id");
var price = queryString("price");
var Quantity = queryString("Quantity");
var bidid = queryString("bidid");
var original_product_id = queryString("original_product_id");
CurrentProductID = original_product_id;
CurrentProductPrice = price;
ShowHideProductCommands('Product', original_product_id, urlQuery, original_product_id, 'search');
totalPriceRemover();
RelatedProduct(original_product_id);
downslide();
}
else if (MP_Query == 'infinioffice') {
SetSource("../Customer/Home.aspx");
}
else if (MP_Query == 'ebay') {
SetSource("Ajax/ebay.aspx?eBayLogId=" + querystring("eBayLogID"));
}
else if (queryString("qstr") == 'controlledbid') {
downslide();
RedirectPlaceBid();
}
else if (queryString("qstr") == 'login') {
downslide();
var url = "http://" + window.location.host + "/MP_AJAX/displayDescription.aspx" + GlobalMpQuery + "&checkBanner=true&_screen=" + screen.width;
var xmlRequest = DoCallback(url, "")
if (xmlRequest) {
var str = xmlRequest.responseText;
if (str == 'ok') {
var merchant_id = queryString("merchant_product_id");
src = '../ProductFiles/' + merchant_id + '/1/1/resolution/index.htm';
SetSourceWithCommands(src);
}
else {
SetSourceWithCommands("http://" + window.location.host + "/MP_AJAX/displayDescription.aspx" + GlobalMpQuery);
}
}
var url = "http://" + window.location.host + "/MP_AJAX/MP_ProductDetails.aspx" + GlobalMpQuery;
var xmlRequest = DoCallback(url, "")
if (xmlRequest) {
var str = xmlRequest.responseText;
var MyDiv = document.getElementById('ACTIVECOMMANDS');
MyDiv.style.visibility = 'visible';
MyDiv.innerHTML = str;
}
else {
var MyDiv = document.getElementById('ACTIVECOMMANDS');
MyDiv.style.VISIBILITY = 'visible';
MyDiv.innerHTML = str;
}
}
else if (MP_Query == 'true') {
downslide();
var src = queryString("productid");
src = "\ImageHandler.ashx?imp_pid=" + src;
BestOfferBid();
}
else if (MP_Query == 'NavigateToProductFromSupport') {
NavigateToProductFromSupport(queryString("productid"));
}
else if (MP_Query == 'infinimarket') {
downslide();
SetSource("Mp_Ajax/Mp_login.aspx?" + window.location.search);
}
}
navigateToHome = false;
}
}
function urlQuery() {
var hasQueryString = document.URL.indexOf('?');
var additionalQueryString = "";
if (hasQueryString != -1) {
additionalQueryString = document.URL.substring(hasQueryString + 1, document.URL.length);
return additionalQueryString;
}
}
function ShowMenuCat() {
document.getElementById("leftbartable").style.top = topCategory - 20;
document.getElementById("leftbartable").style.left = leftCategory;
}
function HideMenuCat() {
}
function HideMenuCatTop() {
}
function topLayerShow() {
if (document.getElementById("topLink"))
{
if (document.getElementById("topLink").style.visibility == "visible") {
return;
}
else {
document.getElementById("topLink").style.visibility = "visible";
}
}
}
function topLayerHide() {
if (document.getElementById("topLink"))
{
if (document.getElementById("topLink").style.visibility == "hidden") {
return;
}
else {
document.getElementById("topLink").style.visibility = "hidden";
}
}
}
function ShowHideProductCommands(type, params, queryString, ProdId, proType) {
enableContentDocumentHeight = true;
FrameSize('');
relatedPro_ParentID = ProdId;
if (type == "Category") {
UnLoadCommands();
var xmlRequest = DoCallback(_Domain + "/Catalog/DisplayWithDetails.aspx", params);
document.getElementById("DIV_LIST").innerHTML = xmlRequest.responseText;
}
if (type == "Product") {
ProAlert = 1;
FavproductId = ProdId;
FavProType = "true"
CurrentProductID = params;
if (proType == "search") {
LoadProductCommands(queryString);
productCmdQuerry = queryString;
if (GetUAgentMainScript() != "") {
LoadProductCommands(queryString, true);
}
}
else if (proType == "nosearch") {
productCmdQuerry = queryString;
LoadProductCommands(queryString);
if (GetUAgentMainScript() != "") {
LoadProductCommands(queryString, true);
}
}
}
HideBottomPagebannersNew();
getIPhoneIViewFor("ShowHideProductCommands");
}
var setTempImage;
function setTemplateImage(src) {
}
function RelatedSetSource(src) {
window.frames["frame_details"].location.replace(src);
}
function SetSource(src) {
if (window.frames["frame_details"] != undefined) {
var catURLForFullView = CateFilesWithResoltuion(src)
if (resizeInfiniViewWithResolution == true) {
SetSrc(catURLForFullView);
} else {
SetSrc(src);
}
UnLoadCommands();
}
else {
this.location.href = src;
}
}
function SetSourceWithCommands(src) {
enableContentDocumentHeight = true;
getIPhoneIViewFor("SetSourceWithCommands");
if (GetUAgentMainScript() != "") {
DisplayFrameWithCommandHideList();
src = src.replace("resolution", "250x250")
SetSrc(src);
fullScreenIframeSrc = src;
}
else {
getIPhoneIViewFor("SetSourceWithCommands");
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
_screenWidthChkr = screen.width;
if (_screenWidthChkr >= 1280) {
src = src.replace("resolution", "1280x1024")
SetSrc(src);
fullScreenIframeSrc = src;
}
else if (_screenWidthChkr >= 1024 && _screenWidthChkr < 1280) {
src = src.replace("resolution", "1024x768")
SetSrc(src);
fullScreenIframeSrc = src;
}
else if (_screenWidthChkr >= 800 && _screenWidthChkr < 1024) {
src = src.replace("resolution", "800x600")
SetSrc(src);
fullScreenIframeSrc = src;
}
}
else {
SetSrc(src);
}
}
}
function LoadAudioPlayer(src) {
var xmlRequest = DoCallback(_Domain + "/" + src, "");
var AudioPlayer = document.getElementById("AudioPlayer");
if (AudioPlayer != null) {
document.getElementById("AudioPlayer").innerHTML = xmlRequest.responseText;
SetAudioPlayerSoundStatus();
}
}
function SetObjectSize(object, width, height) {
if (GetUAgentMainScript() != "") {
document.getElementById(object).style.width = getDynamicTransform("SetObjectSize", width, height)['width'];
document.getElementById(object).style.height = getDynamicTransform("SetObjectSize", width, height)['height'];
}
}
function DoCallback(url, params) {
var pageUrl = url + params;
var xmlRequest;
var xmlRequest;
try {
xmlRequest = new XMLHttpRequest();
}
catch (e) {
try {
xmlRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlRequest.open("GET", pageUrl, false);
xmlRequest.send("");
return xmlRequest;
}
function buyProductPross() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/RelatedProductWizard.aspx?currentProduct=" + CurrentProductID, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
ShowQuestionsNew();
}
else {
SetSource("/loadingpage.html");
relatedProductBarHide();
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function callRelatedShowcase() {
if (relatedProductLength.length > 0) {
if (relatedProductLength[0] != null) {
currentRelatedProduct = relatedProductLength[0];
CurrentProductID = currentRelatedProduct;
ShowQuestionsRelated(currentRelatedProduct)
relatedProductLength.splice(0, 1);
}
else {
relatedProductLength.splice(0, 1);
}
}
}
function ShowQuestionsRelated(RelatedProduct) {
var url = "AJAX/WizardSelector.aspx?product_id=" + RelatedProduct;
SetSource(url);
spaceRowVis();
stop();
}
function ShowQuestions() {
ProAlert = 0;
var url = "AJAX/WizardSelector.aspx?product_id=" + CurrentProductID;
SetSource(url);
spaceRowVis();
stop();
}
function ShowQuestionsFileSystem(prodId) {
var url = "../../../../../AJAX/WizardSelector.aspx?product_id=" + prodId;
SetSource(url);
spaceRowVis();
stop();
}
function ShowWizard() {
var url = "AJAX/ProductConfigWizard.aspx?product_id=" + CurrentProductID;
SetSource(url);
}
function LoadProductCommands(QueryString, TabsLayout) {
var CommandContainer;
var URL;
if (TabsLayout) {
QueryString = QueryString + uAgent + "&Tabs=Y";
CommandContainer = GlobalObject("ACTIVECOMMANDS_TABS");
URL = _Domain + "/AJAX/ProductCommandsFSTabs.aspx";
} else {
QueryString = QueryString + uAgent;
CommandContainer = GlobalObject("ACTIVECOMMANDS");
URL = _Domain + "/AJAX/ProductCommandsFS.aspx";
}
CommandContainer.style.display = 'block';
CommandContainer.style.visibility = 'visible';
var req = null;
req = initXMLHTTPRequest();
if (req) {
if (USE_DATABASE_PRODUCTCOMMANDS) {
req.open("POST", URL + QueryString, true);
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
if (parseInt(WORKFLOW_PARENT_PRODUCT[WORKFLOW_PARENT_PRODUCT.length - 1]) == WORKFLOW_PRODUCT_CURRENT) {
QueryString = QueryString + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + "&ForceCommands=true";
}
else {
QueryString = QueryString + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString();
}
req.open("GET", _Domain + "/AJAX/ProductCommandsFS.aspx" + QueryString, true);
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
if (parseInt(WORKFLOW_PARENT_PRODUCT[WORKFLOW_PARENT_PRODUCT.length - 1]) == WORKFLOW_PRODUCT_CURRENT) {
QueryString = QueryString + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString() + "&ForceCommands=true";
}
else {
QueryString = QueryString + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString();
}
req.open("GET", URL + QueryString, true);
}
else {
req.open("GET", URL + QueryString, true);
}
}
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
CommandContainer.innerHTML = "";
CommandContainer.innerHTML = xmlResult;
if (USE_DATABASE_PRODUCTCOMMANDS) {
CycleFile();
LoadSlideShowCommands();
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
_ProductCommands = new ProductCommands(CurrentProductID);
var ProductType = GlobalObject("PRODUCT_TYPE");
if (ProductType != null) {
switch (ProductType.innerHTML) {
case "NORMAL":
if (document.getElementById("WizardType").innerHTML == "CONFIGURE") {
ProductCommands_FileSystem_Init_Configure();
document.getElementById("PriceRow").style.visibility = 'hidden';
scriptToRunOnPopState = "ProductCommands_FileSystem_Init_Configure();"
}
else {
ProductCommands_FileSystem_Init();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init();"
}
break;
case "BUYER":
alert(2);
ProductCommands_FileSystem_Init_Buyer();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init_Buyer();"
break;
case "AP":
ProductCommands_FileSystem_Init2();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init2();"
break;
case "AP_WITHBUY":
ProductCommands_FileSystem_Init3();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init3();"
break;
case "HR_PRODUCT":
var ProductCategory = 'HR_PRODUCT';
ProductCommands_FileSystem_Init4(ProductCategory);
break;
case "WORKFLOW_PRODUCT":
ProductCommands_FileSystem_Init5();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init5();"
break;
case "BOOKING":
ProductCommands_FileSystem_Init_Booking();
scriptToRunOnPopState = "ProductCommands_FileSystem_Init_Booking();"
break;
}
}
}
}
else {
}
}
req.send("");
}
}
function ProcessProductCommand(arg) {
if (arg == "buy") {
LoadCartCommands();
}
}
function LoadQuestionCommands() {
var myDate = new Date();
var myTime = myDate.getTime();
var xmlRequest = DoCallback(_Domain + "/AJAX/QuestionCommands.aspx?t=" + myTime, "");
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
var relProductCart;
function fakeAlert() {
SetSource(relProductCart);
setTimeout("simplecallme()", 2000);
}
function fileSystemCall(productId, wizname) {
_ProductCommands.SlideShowCommands.ClearTimer();
SetSource("http://" + window.location.host + "/AJAX/WizardSelector.aspx?product_id=" + productId + "&required_name=" + wizname);
}
function LoadCartCommands() {
stop();
var xmlRequest = DoCallback(_Domain + "/AJAX/CartCommands.aspx", "");
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
relatedProductBarHide();
document.getElementById("RelatedProductNextButton").style.display = "none";
document.getElementById("CheckoutButton").style.display = "block";
var tt;
if (document.getElementById("FavouriteProductDiv").style.display == "block") {
document.getElementById("FavouriteProductDiv").style.display = "none";
}
if (relatedProductLength.length > 0) {
SetSource("/loadingpage.html");
var lengArray;
lengArray = relatedProductLength.length;
for (tt = 0; tt < lengArray; tt++) {
if (relatedProductLength[0] != null) {
currentRelatedProduct = relatedProductLength[0];
var xmlRequest = DoCallback(_Domain + "/Shopping/cart.aspx?add2cart=true&product_id=" + currentRelatedProduct, "")
relatedProductLength.splice(0, 1);
}
else {
relatedProductLength.splice(0, 1);
}
}
SetSource("../Shopping/cart.aspx");
ShowCartButton();
}
if (WORKFLOW_PRODUCT) { Workflow_LoadNextProduct(); }
else {
Workflow_ClearContainer();
}
ShowCartButton();
}
function LoadMPCartCommands() {
var xmlRequest = DoCallback(_Domain + "/MP_AJAX/CartCommands.aspx", "");
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
relatedProductBarHide();
}
function LoadSlideShowCommands() {
var xmlRequest = DoCallback(_Domain + "/AJAX/SlideShowCommands.aspx", "");
var SlideShowCommands = document.getElementById("SlideShowCommands");
if (SlideShowCommands != null) {
SlideShowCommands.style.visibility = 'visible';
SlideShowCommands.innerHTML = xmlRequest.responseText;
RenderImageCount();
LoadSlider();
}
}
function ProcessCartCommand(arg) {
var O = "";
if(VIEWSET.IFRAME)
{
O = window["frame_details"];
}else if(VIEWSET.OBJECT)
{
O = window["frame_details"].contentDocument.defaultView;
}
if (arg == "get_equote") {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
if (arg == "update_total") {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
if (arg == "checkout") {
O.SetArgument(arg);
O.Submit();
Workflow_ClearContainer();
UnLoadCommands();
}
if (arg == "continue_shop") {
if (typeof (O.Page_IsValid) != 'undefined') {
if (O.Page_IsValid == null) {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
if (O.Page_IsValid != null && O.Page_IsValid) {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
else {
if (GetUAgentMainScript() != "") {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
else {
if (O.CheckRequiredFieldValidators()) {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
}
}
}
else {
O.SetArgument(arg);
O.Submit();
UnLoadCommands();
}
}
if (arg == "google_checkout") {
O.SetArgument(arg);
O.Submit();
UnLoadCartCommands();
}
}
function ProcessWizardCommand(arg) {
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
}
function GetXmlHttpObject() {
var browser_type = navigator.appName
var xmlHttp = null;
var browser_version = parseInt(navigator.appVersion)
if (browser_type == "Microsoft Internet Explorer" && browser_version >= 4) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else {
xmlHttp = new XMLHttpRequest();
}
return xmlHttp;
}
function stateChanged() {
if (xmlHttp.readyState == 4) {
xmlResult = xmlHttp.responseText;
document.getElementById("DIV_LIST").innerHTML = xmlResult;
if (xmlResult.length > 500) {
SetObjectSize("DIV_LIST", 226, 226);
initArrow('searchRes');
topLayerShow();
simpleTopVar = "showSrch";
spaceRowVis();
downslidetwo();
var StringToMatch = /AJAX\/ItemImage.aspx\?type=Product\&amp;item_id=\d+/;
var firstProduct = MatchString(xmlResult, StringToMatch);
document.getElementById("stackText").innerHTML = "";
SetSource(mainPagePic);
}
else {
topLayerShow();
simpleTopVar = "showSrchnoRec";
spaceRowVis();
var StringToMatch = /AJAX\/ItemImage.aspx\?type=Product\&amp;item_id=\d+/;
var firstProduct = MatchString(xmlResult, StringToMatch);
document.getElementById("stackText").innerHTML = "";
SetSource(mainPagePic);
}
if (firstProduct != null) {
if (USE_DATABASE_PRODUCTCOMMANDS) {
SetSource(firstProduct);
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
var tempStrLenth = firstProduct.length;
var tempStrStart = firstProduct.lastIndexOf('=');
tempStrStart = tempStrStart + 1
firstProduct = firstProduct.substring(tempStrStart, tempStrLenth);
SetSourceWithCommands('../ProductFiles/' + firstProduct + '/1/1/resolution/index.htm');
fullScreenImage = '../ProductFiles/' + firstProduct + '/1/1/resolution/index.htm';
}
}
else {
SetSource("BlankPage.htm")
}
}
else if (xmlHttp.readyState == 3) {
document.getElementById("DIV_LIST").innerHTML = "<table width='100%' height='200' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='favheadertext'>Searching..</td></tr><tr><td align='center' valign='top'>" + loadPagesImage + "</td></tr></table>";
document.getElementById("stackText").innerHTML = "";
SetSource("/loadingpage.html");
SetSource(mainPagePic);
}
}
function stateChanged_WAP() {
if (xmlHttp.readyState == 4) {
xmlResult = xmlHttp.responseText;
document.getElementById("DIV_LIST").innerHTML = xmlResult;
if (xmlResult.length > 500) {
simpleTopVar = "showSrch";
var StringToMatch = /AJAX\/ItemImage.aspx\?type=Product\&amp;item_id=\d+/;
var firstProduct = MatchString(xmlResult, StringToMatch);
}
else {
simpleTopVar = "showSrchnoRec";
var StringToMatch = /AJAX\/ItemImage.aspx\?type=Product\&amp;item_id=\d+/;
var firstProduct = MatchString(xmlResult, StringToMatch);
}
}
else if (xmlHttp.readyState == 3) {
document.getElementById("DIV_LIST").innerHTML = "<table width='100%' height='200' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='favheadertext'>Searching..</td></tr><tr><td align='center' valign='top'>" + loadPagesImage + "</td></tr></table>";
}
}
function SearchProducts() {
if (CategorySearchAtInfiniview) {
SearchProductAtInfiniView();
}
else {
RestoreScreenWindow('');
hideWorkFlow();
FrameSize('');
hideFavRight();
hideHistoryRight();
document.getElementById("leftbartable").style.display = 'block';
document.getElementById("DIV_LIST").style.display = 'block'
document.getElementById("DIV_LIST").style.visibility = 'visible'
document.getElementById("DIV_LIST").innerHTML = "<table width='100%' height='200' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='favheadertext'>Searching..</td></tr><tr><td align='center' valign='top'>" + loadPagesImageCenter + "</td></tr></table>";
myMainCategoryMoving();
slidebox('slidebox1');
textbar('textbarcol');
relatedProductBarHide();
stop();
var xmlResult;
var iChars = "!@#$%^*()+=<-[]\\\`~';,./{}|\":>&?";
var textboxValue;
textboxValue = document.getElementById("ProductSearch1_searchtxt").value;
for (var i = 0; i < textboxValue.length; i++) {
if (iChars.indexOf(textboxValue.charAt(i)) != -1) {
textboxValue = "error"
var queryString = "?ProductSearch=" + textboxValue;
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null) {
alert("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET", "AJAX/ProductDisplay.aspx" + queryString, true);
xmlHttp.send("");
return false;
}
}
if (document.getElementById("ProductSearch1_searchtxt").value == "") {
var queryString = "?ProductSearch=" + document.getElementById("ProductSearch1_searchtxt").value;
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null) {
alert("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET", "AJAX/ProductDisplay.aspx" + queryString, true);
xmlHttp.send("");
}
else if (document.getElementById("ProductSearch1_searchtxt").value != "") {
textboxValue = document.getElementById("ProductSearch1_searchtxt").value;
var queryString = "?ProductSearch=" + textboxValue;
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null) {
alert("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET", "AJAX/ProductDisplay.aspx" + queryString, true);
xmlHttp.send("");
}
}
document.getElementById("ProductSearch1_searchtxt").value = ""
}
function SearchProducts_WAP() {
var domainforsearch = window.location.host;
if (domainforsearch.toLowerCase() == "saudiairline.infinishops.com" || domainforsearch.toLowerCase() == "xwww.business4less.co.uk") {
var SearchType = "KeywordSearch";
}
hideFavRight();
document.getElementById("frame_details").src = ""
document.getElementById("leftbartable").style.display = 'block';
document.getElementById("DIV_LIST").style.display = 'block'
document.getElementById("DIV_LIST").style.visibility = 'visible'
document.getElementById("DIV_LIST").innerHTML = "<table width='100%' height='200' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='bottom' class='favheadertext'>Searching..</td></tr><tr><td align='center' valign='top'>" + loadPagesImageCenter + "</td></tr></table>";
relatedProductBarHide();
UnLoadCommands();
var txt = document.getElementById("ProductSearch1_searchtxt").value
var searchText = (arguments.length > 0 && txt == "") ? arguments[0] : txt;
var xmlResult;
var iChars = "!@#$%^*()+=<-[]\\\`~';,./{}|\":>&?";
var textboxValue = searchText;
var RedirectURL;
var queryString;
for (var i = 0; i < textboxValue.length; i++) {
if (iChars.indexOf(textboxValue.charAt(i)) != -1) {
textboxValue = "error"
queryString = "?ProductSearch=" + textboxValue;
}
}
if (textboxValue == "") {
queryString = "?ProductSearch=" + textboxValue;
}
else if (textboxValue != "") {
queryString = "?ProductSearch=" + textboxValue;
if (SearchType && SearchType == "KeywordSearch") {
queryString += "&SearchType=" + SearchType;
}
if (arguments.length > 1) {
var fromMainPage = arguments[1];
if (fromMainPage) {
queryString += "&fromMainPage=Y";
}
}
if (ALLOWPAGING) {
queryString += "&AllowPaging=Y";
}
}
var requestURL = window.location.protocol + '//' + window.location.host + '/AJAX/ProductDisplay.aspx' + queryString;
enableContentDocumentHeight = true;
SetSrc(requestURL);
DisplayFrameWithCommandHideList();
document.getElementById("ProductSearch1_searchtxt").value = ""
}
function MatchString(SourceString, StringToMatch) {
var re = new RegExp(StringToMatch);
var m = re.exec(SourceString);
if (m == null) {
}
else {
var s = "";
for (i = 0; i < m.length; i++) {
s = s + m[i] + "\n";
}
return s;
}
}
function UnLoadCommands() {
var ACTIVECOMMANDS = document.getElementById("ACTIVECOMMANDS");
var ACTIVECOMMANDS_TABS = document.getElementById("ACTIVECOMMANDS_TABS");
if (ACTIVECOMMANDS) {
ACTIVECOMMANDS.style.visibility = 'hidden';
ACTIVECOMMANDS.innerHTML = "";
}
if (ACTIVECOMMANDS_TABS) {
ACTIVECOMMANDS_TABS.style.visibility = 'hidden';
ACTIVECOMMANDS_TABS.innerHTML = "";
}
if (CurrentProductID != 0) {
var _document = null;
try {
_document = window.frames["frame_ProductFilesFS"].window.document;
if (_document != null) {
window.frames["frame_ProductFiles"].MediaFiles = null;
window.frames["frame_ProductFiles"].AudioFiles = null;
}
}
catch (err) {
}
}
}
function ShowShoppingCart(url) {
enableContentDocumentHeight = true;
SetSource(url);
if (document.getElementById('LogoTable')) {
document.getElementById('LogoTable').style.display = 'none';
}
LoadCartCommands();
}
function movepic(img_name, img_src) {
document.getElementById(img_name).src = img_src;
}
function refresh() {
if (GetUAgentMainScript() != "") {
navigateToHome = true;
document.getElementById("FavouriteProductDiv").style.display = 'none';
stop();
relatedProductBarHide();
myaccountopen();
MainCategory();
DisplayListHideFrameWithCommand();
}
else {
if (document.getElementById("stack_next")) {
document.getElementById("stack_next").style.display = "none";
}
if (document.getElementById("stack_back")) {
document.getElementById("stack_back").style.display = "none";
}
hideWorkFlow();
FrameSize('large');
if (PreviewControl == false) {
_mainCateId = null;
}
navigateToHome = true;
ProtdArr = 0;
document.getElementById("DIV_LIST").innerHTML = "";
if (catComView.toLowerCase() == "topper") {
document.getElementById("leftbartable").style.display = 'none';
}
else {
document.getElementById("leftbartable").style.display = 'block';
}
document.getElementById("FavouriteProductDiv").style.display = 'none';
document.getElementById("HistoryProductDiv").style.display = "none";
document.getElementById("showChatRoom_PHP").style.display = "none";
stop();
relatedProductBarHide();
downslidetwo();
myaccountopen();
nullAllVar();
nullMainCatVar();
ArrayColorRemove();
document.getElementById("stackText").innerHTML = "";
CatLoadCaller();
CheckBottombannerNew();
getIPhoneIViewFor("refresh");
}
}
function DisplayPage(url) {
var xmlResult;
var xmlRequest = DoCallback(_Domain + "/" + url, "");
xmlResult = xmlRequest.responseText;
var regSignIn = /signin/;
var regHome = /home/;
var strSignIn = "signin";
var strHome = "home";
var pageTitle = MatchString(xmlResult, regSignIn);
if (pageTitle == null) {
pageTitle = MatchString(xmlResult, regHome);
}
if (pageTitle.indexOf(strSignIn) == 0) {
SetSource(url);
}
if (pageTitle.indexOf(strHome) == 0) {
document.write(xmlResult);
}
}
function ShowCartButton() {
document.getElementById("img_cart").style.visibility = 'visible';
document.getElementById("ShopCounter").style.visibility = 'visible';
}
function HideCartButton() {
document.getElementById("img_cart").style.visibility = 'hidden';
document.getElementById("ShopCounter").style.visibility = 'hidden';
UnLoadCommands();
}
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
}
function PageQuery(q) {
if (q.length > 1) this.q = q.substring(1, q.length);
else this.q = null;
this.keyValuePairs = new Array();
if (q) {
for (var i = 0; i < this.q.split("&").length; i++) {
this.keyValuePairs[i] = this.q.split("&")[i];
}
}
this.getKeyValuePairs = function () { return this.keyValuePairs; }
this.getValue = function (s) {
for (var j = 0; j < this.keyValuePairs.length; j++) {
if (this.keyValuePairs[j].split("=")[0] == s)
return this.keyValuePairs[j].split("=")[1];
}
return false;
}
this.getParameters = function () {
var a = new Array(this.getLength());
for (var j = 0; j < this.keyValuePairs.length; j++) {
a[j] = this.keyValuePairs[j].split("=")[0];
}
return a;
}
this.getLength = function () { return this.keyValuePairs.length; }
}
function queryString(key) {
var page = new PageQuery(window.location.search);
return unescape(page.getValue(key));
}
function toggleBox(szDivID, iState) {
var obj = document.layers ? document.layers[szDivID] :
document.getElementById ? document.getElementById(szDivID).style :
document.all[szDivID].style;
obj.visibility = document.layers ? (iState ? "show" : "hide") :
(iState ? "visible" : "hidden");
}
function ShowingData(DataToShow, DataToHide) {
showLayer(DataToShow);
hideLayer(DataToHide);
}
function showLayer(layerName) {
if (document.getElementById) {
var targetElement = document.getElementById(layerName);
document.getElementById(layerName).style.display = 'block';
}
}
function hideLayer(layerName) {
if (document.getElementById) {
var targetElement = document.getElementById(layerName);
document.getElementById(layerName).style.display = 'none';
}
}
ns4 = (document.layers) ? true : false
ie4 = (document.all) ? true : false
function init() {
if ((catloadChecker == "Process") && (advertisementChecker == "Process") && (bannerChecker == "Process")) {
}
if (ns4 || ie4) {
if (ns4) block = document.dynamic
if (ie4) block = dynamic.style
block.x = parseInt(block.left);
}
CatLoadCaller();
defaultPageBanner()
LoadAdvertisements();
var qsVariableName, qsVariableValue;
var query = location.href;
query = query.substring(query.indexOf('?') + 1, query.length);
qsVariableName = query.substring(0, query.indexOf('='))
qsVariableValue = query.substring(query.indexOf('=') + 1, query.length);
if ((qsVariableName.toLowerCase()) == "didro") {
document.getElementById("leftbartable").style.display = 'none';
SetSource('/shopping/checkout.aspx' + '?OrderID=' + qsVariableValue);
}
}
function checkMainInterFace() {
if ((catloadChecker == "Done") && (advertisementChecker == "Done") && (bannerChecker == "Done")) {
if (catComView == "topper") {
hrMenu_HideAllLayers('level1');
hrMenu_RootLevel(horizontalDefaultCat, 'hrMenuContainer');
document.getElementById("DIV_LIST").style.visibility = 'hidden';
}
else {
document.getElementById("DIV_LIST").style.display = 'block';
document.getElementById("DIV_LIST").style.visibility = 'visible';
}
if (document.getElementById("ProductSearch1_searchtxt").style.visibilty == "visible") {
document.getElementById("ProductSearch1_searchtxt").focus();
}
}
}
function downslide() {
}
function downslidetwo() {
}
function slidebox(layerName) {
document.getElementById(layerName).style.left = 0;
document.getElementById(layerName).style.width = getDynamicTransform('slidebox')['width'];
document.getElementById(layerName).style.height = getDynamicTransform('slidebox')['height'];
document.getElementById(layerName).style.overflow = 'hidden';
}
function textbar(layerName) {
if (document.getElementById(layerName)) {
document.getElementById(layerName).style.display = 'block';
}
}
function imgone(layerhide) {
document.getElementById(layerhide).style.display = 'none';
}
function imgtwo(layershow) {
document.getElementById(layershow).style.display = 'block';
}
function comb(layerhide, layershow) {
imgone(layerhide);
imgtwo(layershow);
document.getElementById("textbarcol2").style.display = 'none'; 	// New Updation for product
document.getElementById("DIV_LIST").style.display = 'none'; 		// New Updation for product
}
function GetProductPDFFile() {
var Data = "?product_id=" + CurrentProductID;
var URL = "AJAX/ProductPDFFile.aspx";
window.open(URL + Data, "Product PDF File", "height=425,width=585,toolbar=no, menubar=no, location=no,status=0");
}
var advertisementVisiblity;   // Advertisement
advertisementVisiblity = 0;
function LoadAdvertisements() {
spaceRowVis();
GetBrowserIndependentElement("DIV_BOTTOM").innerHTML = loadPagesImage;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "../AJAX/Advertisements.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
document.getElementById("DIV_BOTTOM").innerHTML = req.responseText;
advertisementChecker = "Done";
checkMainInterFace();
myMainCategoryMoving();
}
else {
document.getElementById("DIV_BOTTOM").innerHTML = loadPagesImage;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function LoadAdvertisementsAtInfiniOffice() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "../AJAX/Advertisements.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
GetBrowserIndependentElement("DIV_BOTTOM").innerHTML = xmlResult;
}
else {
GetBrowserIndependentElement("DIV_BOTTOM").innerHTML = "Please wait while the page loads.";
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
stop();
}
}
function RenderImageCount() {
currentImageNo = 0;
var currentImageQuantity = "/1";
var ImageCounter = document.getElementById("image_counter");
if (ImageCounter != null) {
ImageCounter.value = currentImageQuantity;
document.getElementById("txtCurrentImage").value = "1";
}
ActiveCommands = document.getElementById("ACTIVECOMMANDS");
if (ActiveCommands != null) {
}
var PrevImage = document.getElementById("prev_arrow");
if (PrevImage != null) {
if (CurrentSlideShow == 1) {
PrevImage.onclick = ImageGalleryPrev;
}
if (CurrentSlideShow == 0) {
PrevImage.onclick = ImageGalleryPrev;
}
}
var NextArrow = document.getElementById("next_arrow");
if (NextArrow != null) {
if (CurrentSlideShow == 1) {
NextArrow.onclick = ImageGalleryNext;
}
if (CurrentSlideShow == 0) {
NextArrow.onclick = ImageGalleryNext;
}
}
}
function GetBrowserIndependentElement(element) {
if (document.getElementById) {
return document.getElementById(element);
}
else if (document.getElementByName) {
return document.getElementByName(element);
}
else if (document.layers) {
return document.layers[element];
}
else if (document.all) {
return document.all[element];
}
}
function ProcessConvinceMeClick() {
SetCurrentSummarySlideShow();
LoadPCMS();
ConvinceMeSummary_AttachHandler();
}
function SetCurrentSummarySlideShow() {
if (CurrentSlideShow == 0) { CurrentSlideShow = 1; }
else { CurrentSlideShow = 0; }
}
function LoadPCMS()
{
if (timer != null) {
clearTimeout(timer);
}
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) {
}
}
if (CurrentSlideShow == 0) {
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();
}
else {
var src = "http://" + window.location.host + "/AJAX/ProductMediaFiles.aspx?product_id=" + CurrentProductID;
window.frames["frame_ProductFiles"].location = src;
LoadSlideShowCommands();
CycleFile();
}
}
function ConvinceMeSummary_AttachHandler() {
var ConvinceMe = GetBrowserIndependentElement("img_convinceme");
if (CurrentSlideShow == 1) {
ConvinceMe.src = product_image;
ConvinceMe.onmousedown = function () { roll_over('conve', '../images/cat_img/new/product_hover.gif'); }
ConvinceMe.onmouseup = function () { roll_over('conve', '../images/cat_img/new/product.gif'); }
ConvinceMe.onmouseout = function () { roll_over('conve', '../images/cat_img/new/product.gif'); }
ConvinceMe.onclick = ProcessConvinceMeClick;
}
else if (CurrentSlideShow == 0) {
ConvinceMe.src = simple_image;
ConvinceMe.onmousedown = function () { roll_over('conve', '../images/cat_img/new/convince_hover.gif'); }
ConvinceMe.onmouseup = function () { roll_over('conve', '../images/cat_img/new/convince_simple.gif'); }
ConvinceMe.onmouseout = function () { roll_over('conve', '../images/cat_img/new/convince_simple.gif'); }
ConvinceMe.onclick = ProcessConvinceMeClick;
}
}
function ImageGalleryNext() {
RefreshSoundButton();
var MediaFiles = window.frames["frame_ProductFiles"].MediaFiles;
var AudioFiles = window.frames["frame_ProductFiles"].AudioFiles;
var FileCount;
var imgFile;
var audFile;
if (MediaFiles != null) {
FileCount = window.frames["frame_ProductFiles"].MediaFiles.length;
}
if (FileCount > 1 && currentImageNo <= FileCount) {
currentImageNo++;
if (currentImageNo < FileCount) {
imgFile = window.frames["frame_ProductFiles"].MediaFiles[currentImageNo];
SetSourceWithCommands(imgFile);
SetMediaPlayerSoundStatus();
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
parent.window.frames['frame_slider'].moveSlider(currentImageNo + 1);
if (window.frames["frame_ProductFiles"].AudioFiles != null) {
audFile = window.frames["frame_ProductFiles"].AudioFiles[currentImageNo];
if (audFile != null) {
LoadAudioPlayer(audFile);
}
}
}
else { currentImageNo--; }
}
}
function ImageGalleryPrev() {
RefreshSoundButton();
var MediaFiles = window.frames["frame_ProductFiles"].MediaFiles;
var AudioFiles = window.frames["frame_ProductFiles"].AudioFiles;
var FileCount
var imgFile;
var audFile;
if (MediaFiles != null) {
FileCount = window.frames["frame_ProductFiles"].MediaFiles.length;
}
if (FileCount > 1) {
if (currentImageNo > -1 && currentImageNo <= FileCount) {
currentImageNo--;
if (currentImageNo > -1) {
imgFile = window.frames["frame_ProductFiles"].MediaFiles[currentImageNo];
SetSourceWithCommands(imgFile);
SetMediaPlayerSoundStatus();
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
parent.window.frames['frame_slider'].moveSlider(currentImageNo + 1);
if (window.frames["frame_ProductFiles"].AudioFiles != null) {
audFile = window.frames["frame_ProductFiles"].AudioFiles[currentImageNo];
if (audFile != null) {
LoadAudioPlayer(audFile);
}
}
}
else { currentImageNo++; }
}
}
}
function RenderFileCount() {
var TotalFiles = window.frames["frame_ProductFiles"].MediaFiles.length;
var ImageCounter = document.getElementById("image_counter");
if (ImageCounter != null) {
ImageCounter.value = '/' + TotalFiles;
document.getElementById("txtCurrentImage").value = "1";
}
}
function GetImageSource() {
var images = window.frames["frame_details"].images;
var currentImage = window.frames["frame_details"].currentImageNo;
return images[currentImage];
}
function GalleryImageNext() {
var Files = window.frames["frame_details"].images;
var FileCount;
var imgFile;
if (Files != null) {
FileCount = window.frames["frame_details"].images.length;
}
if (FileCount == 1) {
imgFile = window.frames["frame_details"].images[0];
SetSourceWithCommands(imgFile);
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
}
if (FileCount > 0 && currentImageNo <= FileCount) {
currentImageNo++;
if (currentImageNo < FileCount) {
imgFile = window.frames["frame_details"].images[currentImageNo];
SetSourceWithCommands(imgFile);
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
}
else { currentImageNo--; }
}
}
function GalleryImagePrev() {
var Files = window.frames["frame_details"].images;
var FileCount
var imgFile;
if (Files != null) {
FileCount = window.frames["frame_details"].images.length;
}
if (FileCount == 1) {
imgFile = window.frames["frame_details"].images[0];
SetSourceWithCommands(imgFile);
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
}
if (FileCount > 0) {
if (currentImageNo > -1 && currentImageNo <= FileCount) {
currentImageNo--;
if (currentImageNo > -1) {
imgFile = window.frames["frame_details"].images[currentImageNo];
SetSourceWithCommands(imgFile);
document.getElementById("image_counter").value = '/' + FileCount;
document.getElementById("txtCurrentImage").value = (currentImageNo + 1);
}
else { currentImageNo++; }
}
}
}
function CallWebService(url, params) {
var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
xmlRequest.open("POST", url, false);
xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlRequest.send(params);
return xmlRequest;
}
function RemoteCallWebService(url, ns, method, params) {
var xmlRequest;
xmlRequest = globalAjaxHttpObject();
xmlRequest.open("POST", url, false);
xmlRequest.setRequestHeader("Man", "POST " + url + "HTTP/1.1")
xmlRequest.setRequestHeader("MessageType", "CALL")
xmlRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlRequest.setRequestHeader("SOAPAction", ns + "/" + method);
var sr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap:Envelope " +
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<soap:Body>" +
"<" + method + " xmlns=\"" + ns + "\">" + params + "</" + method + "></soap:Body></soap:Envelope>";
xmlRequest.send(sr);
return xmlRequest;
}
function LoadSupport(url) {
var e = window.event
if (url == null) {
enlarge(showimage, e, "overActive", 114, 388);
SetObjectSize("frame_support", 536, 120);
if (isSupportFrameIntialiazed == false) {
SetSupportFrameSource();
isSupportFrameIntialiazed = true;
}
}
else {
window.open(url, 'mywindow');
}
}
function NavigateToProductFromSupport(productID) {
var PageName = GetPageName();
if (PageName.toLowerCase() == '/ajax/home.aspx') {
var URL = "http://" + window.location.host + "/default.aspx?ProURL_ID=" + productID;
parent.window.location.href = URL;
}
else {
document.getElementById("stackText").innerHTML = "";
hideWorkFlow();
totalPriceRemoverNew();
var url = "http://" + location.hostname + "/Utility.asmx";
var xmlRequest = RemoteCallWebService(url, "business4less.com", "ValidProduct", "<ProductID>" + productID.toString() + "</ProductID>");
var xContent = ParseXMLResponse(xmlRequest)
var result = xContent;
if (result == "1") {
downslide();
RelatedProduct(productID);
ShowHideProductCommands('Product', productID, '?product_id=' + productID, productID, 'nosearch');
}
}
}
function LoadProductImageFiles(src, ProductID) {
getIPhoneIViewFor("LoadProductImageFiles");
relatedProductLength = new Array(0);
if (USE_DATABASE_PRODUCTCOMMANDS) {
SetSource(src);
var srcFiles = "AJAX/ProductImageFiles.aspx?product_id=" + ProductID;
window.frames["frame_ProductFiles"].location = srcFiles;
SetSourceWithCommands(src);
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
}
}
var ie = document.all;
var ns6 = document.getElementById && !document.all;
function ietruebody() {
return (document.compatMode && document.compatMode != 'BackCompat' && !window.opera) ? document.documentElement : document.body;
}
function enlarge(which, e, position, imgwidth, imgheight) {
if (ie || ns6) {
crossobj = document.getElementById ? document.getElementById('showimage') : document.all.showimage;
if (position == 'overActive') {
pgyoffset = ns6 ? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop);
horzpos = ns6 ? pageXOffset + window.innerWidth : ietruebody().scrollLeft + ietruebody().clientWidth;
vertpos = ns6 ? pgyoffset + window.innerHeight : pgyoffset + ietruebody().clientHeight / 2 - imgheight / 2;
horzpos = 114;
vertpos = 388;
if (window.opera && window.innerHeight)
{
vertpos = pgyoffset + window.innerHeight / 2 - imgheight / 2;
vertpos = Math.Max(pgyoffset, vertpos);
}
}
else if (position == 'center') {
pgyoffset = ns6 ? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop);
horzpos = ns6 ? pageXOffset + window.innerWidth / 2 - imgwidth / 2 : ietruebody().scrollLeft + ietruebody().clientWidth / 2 - imgwidth / 2;
vertpos = ns6 ? pgyoffset + window.innerHeight / 2 - imgheight / 2 : pgyoffset + ietruebody().clientHeight / 2 - imgheight / 2;
if (window.opera && window.innerHeight)
{
vertpos = pgyoffset + window.innerHeight / 2 - imgheight / 2;
vertpos = Math.Max(pgyoffset, vertpos);
}
}
else {
var horzpos = ns6 ? pageXOffset + e.clientX : ietruebody().scrollLeft + event.clientX;
var vertpos = ns6 ? pageYOffset + e.clientY : ietruebody().scrollTop + event.clientY;
}
crossobj.style.left = horzpos + 'px';
crossobj.style.top = vertpos + 'px';
crossobj.style.visibility = 'visible';
return false;
}
else {
return true;
}
}
function closepreview() {
crossobj.style.visibility = 'hidden';
}
function drag_drop(e) {
if (ie && dragapproved) {
crossobj.style.left = tempx + event.clientX - offsetx + 'px';
crossobj.style.top = tempy + event.clientY - offsety + 'px';
}
else if (ns6 && dragapproved) {
crossobj.style.left = tempx + e.clientX - offsetx + 'px';
crossobj.style.top = tempy + e.clientY - offsety + 'px';
}
}
function initializedrag(e) {
if ((ie && event.srcElement.id == 'dragbar') || (ns6 && e.target.id == 'dragbar')) {
offsetx = ie ? event.clientX : e.clientX;
offsety = ie ? event.clientY : e.clientY;
tempx = parseInt(crossobj.style.left);
tempy = parseInt(crossobj.style.top);
dragapproved = true;
document.onmousemove = drag_drop;
}
}
document.onmousedown = initializedrag
document.onmouseup = new Function(dragapproved = false)
function chatbox() {
RestoreScreenWindow('../Images_Private/Main_Image/main.html');
FrameSize('');
document.getElementById("sup").style.visibility = "hidden";
document.getElementById("btd").style.display = "none";
document.getElementById("cht").style.display = "block";
document.getElementById("BottomBannerTD").style.display = "none";
}
function chatboxhide() {
if (document.getElementById("btd")) {
document.getElementById("btd").style.display = "block";
}
if (document.getElementById("sup")) {
document.getElementById("sup").style.visibility = "visible";
}
if (document.getElementById("cht")) {
document.getElementById("cht").style.display = "none";
}
if (document.getElementById("nchat")) {
document.getElementById("nchat").src = "../images/chat.jpg";
}
CheckBottombannerNew();
}
function setDocumentDomain() {
if (fullDomainName == "") {
fullDomainName = document.domain;
}
var domain = document.domain;
document.domain = domain.substring(domain.indexOf('.') + 1);
setCookie();
}
function SetSupportFrameSource() {
var liveDomain = "http://live." + document.domain;
var ifrm = document.getElementById("frame_support");
ifrm.src = liveDomain;
}
function showSelected(ddl) {
var selObj = parent.window.frames['frame_details'].document.getElementById(ddl);
var selIndex = selObj.selectedIndex;
return false;
}
function loadChildLevels(elementID, productID, wizardID, parentLevel, childLevel, childLevelType) {
if (childLevel == null && childLevelType == null) {
CalculateAmount_WizardProduct(wizardID);
return;
}
var selObj = parent.window.frames['frame_details'].GetBrowserIndependentElement(elementID);
var selIndex = selObj.selectedIndex;
var dependentOption = selObj.options[selIndex].value;
var url = "http://" + location.hostname + "/Utility.asmx";
var params = "<ElementID>" + elementID.toString() + "</ElementID><ProductID>" + productID.toString() + "</ProductID><WizardID>" + wizardID.toString() + "</WizardID><LevelID>" + childLevel.toString() + "</LevelID><DependentLevel>" + parentLevel.toString() + "</DependentLevel><DependentOption>" + dependentOption.toString() + "</DependentOption>";
var xmlRequest = RemoteCallWebService(url, "business4less.com", "GetWizardLevelOptions", params);
var xmlContent = ParseXMLResponse(xmlRequest);
var xmlDoc = GetWizardControlsAsXMLDocument(xmlContent);
for (i = 0; i < xmlDoc.childNodes.length; i++) {
var xmlNode = xmlDoc.childNodes._nodes[i];
var _elementID = xmlNode.nodeName;
var childWizardLevel = top.window.frames['frame_details'].GetBrowserIndependentElement(_elementID);
var childWizardLevelContainer = childWizardLevel.parentNode;
if (BrowserDetect.browser == "Explorer" && BrowserDetect.version >= 4) {
var temp = xmlNode.childNodes._nodes[0].getXML();
temp = temp.replace(/&apos;/g, "'");
temp = temp.replace(/''/g, "null");
temp = temp.replace(/(\")/g, "\"");
childWizardLevelContainer.innerHTML = temp;
}
else {
var temp = xmlNode.childNodes._nodes[0].getXML();
temp = temp.replace(/&apos;/g, "'");
temp = temp.replace(/''/g, "null");
temp = temp.replace(/(\")/g, "\"");
childWizardLevelContainer.innerHTML = temp;
}
}
CalculateAmount_WizardProduct(wizardID);
}
function loadChildLevelsForOption(elementID, productID, wizardID, parentLevel, childLevel, childLevelType) {
var selObj = parent.window.frames['frame_details'].GetBrowserIndependentElement(elementID);
var selOpt;
var OptionStatus;
var dependentOption;
for (i = 0; i < selObj.rows.length; i++) {
selOpt = selObj.rows(i).cells(0).childNodes(0)
OptionStatus = selOpt.checked;
if (OptionStatus == true) {
dependentOption = selOpt.value;
break;
}
}
if (OptionStatus == true) {
var url = "http://" + location.hostname + "/Utility.asmx";
var params = "<ElementID>" + elementID.toString() + "</ElementID><ProductID>" + productID.toString() + "</ProductID><WizardID>" + wizardID.toString() + "</WizardID><LevelID>" + childLevel.toString() + "</LevelID><DependentLevel>" + parentLevel.toString() + "</DependentLevel><DependentOption>" + dependentOption.toString() + "</DependentOption>";
var xmlRequest = RemoteCallWebService(url, "business4less.com", "GetWizardLevelOptions", params);
var xmlContent = ParseXMLResponse(xmlRequest);
var xmlDoc = GetWizardControlsAsXMLDocument(xmlContent);
for (i = 0; i < xmlDoc.childNodes.length; i++) {
var xmlNode = xmlDoc.childNodes._nodes[i];
var _elementID = xmlNode.nodeName;
var childWizardLevel = top.window.frames['frame_details'].GetBrowserIndependentElement(_elementID);
var childWizardLevelContainer = childWizardLevel.parentNode;
if (BrowserDetect.browser == "Explorer" && BrowserDetect.version >= 4) {
var temp = xmlNode.childNodes._nodes[0].getXML();
temp = temp.replace(/&apos;/g, "'");
temp = temp.replace(/''/g, "null");
temp = temp.replace(/(\")/g, "\"");
childWizardLevelContainer.innerHTML = temp;
}
else {
var temp = xmlNode.childNodes._nodes[0].getXML();
temp = temp.replace(/&apos;/g, "'");
temp = temp.replace(/''/g, "null");
temp = temp.replace(/(\")/g, "\"");
childWizardLevelContainer.innerHTML = temp;
}
}
CalculateAmount_WizardProduct(wizardID);
}
}
function noAlphaBets(e) {
var keynum
var keychar
var numcheck
if (window.event) { keynum = e.keyCode }
else if (e.which) { keynum = e.which }
keychar = String.fromCharCode(keynum)
numcheck = /\D/
if (numcheck.test(keychar)) {
if (keynum == 13) {
var val = document.getElementById("txtCurrentImage").value;
_SlideShowCommands.MoveSliderToQueryValue(val);
}
else {
return numcheck;
}
}
}
function ImageGalleryMove() {
RefreshSoundButton();
var MediaFiles = window.frames["frame_ProductFiles"].MediaFiles;
var AudioFiles = window.frames["frame_ProductFiles"].AudioFiles;
var FileCount;
var imgFile;
var audFile;
if (MediaFiles != null) {
FileCount = window.frames["frame_ProductFiles"].MediaFiles.length;
}
if (FileCount == 1) {
imgFile = window.frames["frame_ProductFiles"].MediaFiles[0];
SetSourceWithCommands(imgFile);
SetMediaPlayerSoundStatus();
var TotalFiles = document.getElementById("image_counter");
if (TotalFiles != null) {
TotalFiles.value = '/' + FileCount;
}
if (window.frames["frame_ProductFiles"].AudioFiles != null) {
audFile = window.frames["frame_ProductFiles"].AudioFiles[0];
if (audFile != null) {
LoadAudioPlayer(audFile);
}
}
}
if (FileCount > 0 && currentImageNo <= FileCount) {
if (currentImageNo < FileCount) {
imgFile = window.frames["frame_ProductFiles"].MediaFiles[currentImageNo];
SetSourceWithCommands(imgFile);
var TotalFiles = document.getElementById("image_counter");
if (TotalFiles != null) {
TotalFiles.value = '/' + FileCount;
parent.window.frames['frame_slider'].moveSlider(currentImageNo + 1);
}
if (window.frames["frame_ProductFiles"].AudioFiles != null) {
audFile = window.frames["frame_ProductFiles"].AudioFiles[currentImageNo];
if (audFile != null) {
LoadAudioPlayer(audFile);
}
}
}
}
}
function GetDocumentTitle() {
var domain = document.domain;
var words = domain.split('.');
var result = "::.. Welcome to " + words[1] + " ..::";
return result;
}
function GetWizardLevels(merchantID, wizardID) {
var url = "http://" + location.hostname + "/Utility.asmx";
var params = "<MerchantID>" + merchantID.toString() + "</MerchantID><WizardID>" + wizardID.toString() + "</WizardID>";
var xmlRequest = RemoteCallWebService(url, "business4less.com", "GetWizardLevels", params);
var xmlContent = ParseXMLResponse(xmlRequest);
var xmlDoc = GetWizardControlsAsXMLDocument(xmlContent);
var LinkCode = "";
for (i = 0; i < xmlDoc.childNodes.length; i++) {
var xmlNode = xmlDoc.childNodes._nodes[i];
var _elementID = xmlNode.nodeName;
var childWizardLevel = GetBrowserIndendentElementForDocument(parent.window.frames["frame_details"].document, WizCtrlName + _elementID);
var childWizardLevelContainer = childWizardLevel.parentNode;
switch (_elementID.substr(0, 5)) {
case "_ddl_":
var selIndex = childWizardLevel.selectedIndex;
var selValue = childWizardLevel.options[selIndex].value;
LinkCode += "." + selValue;
break
case "_rbl_":
var selOpt;
var OptionStatus;
for (i = 0; i < childWizardLevel.rows.length; i++) {
selOpt = childWizardLevel.rows[i].cells[0].childNodes[0]
OptionStatus = selOpt.checked;
if (OptionStatus == true) {
LinkCode += "." + selOpt.value;
break;
}
}
break
}
}
var RedirectURL;
if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 1) {
RedirectURL = "/AJAX/ProductSelector.aspx?WizardID=" + wizardID + "&LinkCode=" + LinkCode + "&ProductID=" + CurrentProductID + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString();
}
else if (WORKFLOW_PRODUCT == true && WORKFLOW_PRODUCT_MANDATORY == 0) {
RedirectURL = "/AJAX/ProductSelector.aspx?WizardID=" + wizardID + "&LinkCode=" + LinkCode + "&ProductID=" + CurrentProductID + "&workflow_product=1&mandatory=" + WORKFLOW_PRODUCT_MANDATORY.toString();
}
else {
RedirectURL = "/AJAX/ProductSelector.aspx?WizardID=" + wizardID + "&LinkCode=" + LinkCode + "&ProductID=" + CurrentProductID;
}
parent.window.frames['frame_details'].location = RedirectURL;
}
function LoadWizardCommands() {
var xmlRequest = DoCallback(_Domain + "/AJAX/WizardCommands.aspx", "?product_id=" + CurrentProductID);
var a = document.getElementById("ACTIVECOMMANDS");
if (a != null) {
a.innerHTML = xmlRequest.responseText;
a.style.visibility = 'visible';
}
}
function myaccount() {
getIPhoneIViewFor("myaccount");
if (GetUAgentMainScript() != "") {
relatedProductBarHide();
}
else {
if (document.getElementById("stack_next")) {
document.getElementById("stack_next").style.display = "none";
}
if (document.getElementById("stack_back")) {
document.getElementById("stack_back").style.display = "none";
}
FrameSize('');
document.getElementById("stackText").innerHTML = "";
stop();
relatedProductBarHide();
if (sldbox == 1) {
document.getElementById("leftbartable").style.display = 'none';
}
else if (sldbox == 2) {
downslide();
}
}
}
function myaccountopen() {
topLayerHide();
}
function LoadCustomerRegistrationContinue(_url, _class, _text) {
var xmlRequest = DoCallback(_Domain + "/AJAX/RegistrationCommands.aspx", "");
document.getElementById("ACTIVECOMMANDS").innerHTML = "<a href='" + _url + "' class=" + _class + ">" + _text + "</a>";
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
function CycleFile() {
var MediaFiles = window.frames["frame_ProductFiles"].MediaFiles;
var FileCount;
if (MediaFiles != null) {
FileCount = window.frames["frame_ProductFiles"].MediaFiles.length;
if (FileCount != 1) {
if (FileCount > 1 && currentImageNo <= FileCount) {
currentImageNo++;
var CurrentImage = document.getElementById("txtCurrentImage");
if (CurrentImage != null) {
if (currentImageNo < FileCount) {
CurrentImage.value = currentImageNo + 1;
}
else {
currentImageNo = 0;
CurrentImage.value = currentImageNo + 1;
}
}
ImageGalleryMove();
CycleFileDelay = 20;
timer = setTimeout("CycleFile()", CycleFileDelay * 1000);
}
else {
currentImageNo = 0;
CycleFileDelay = 1;
timer = setTimeout("CycleFile()", CycleFileDelay * 1000);
}
}
}
else {
currentImageNo = 0;
CycleFileDelay = 20;
timer = setTimeout("CycleFile()", CycleFileDelay * 1000);
}
}
function LoadSlider() {
var SliderContainer = document.getElementById("frame_slider");
if (SliderContainer != null) {
var MediaFiles = window.frames["frame_ProductFiles"].MediaFiles;
var FileCount;
if (MediaFiles != null) {
if (sliderTimer != null) {
clearTimeout(sliderTimer);
TimeToWaitForFilesToLoad = 1;
}
FileCount = window.frames["frame_ProductFiles"].MediaFiles.length;
SliderContainer.src = "\AJAX/slider.aspx?max=" + FileCount;
SliderContainer.style.display = 'block';
}
else {
TimeToWaitForFilesToLoad++;
if (TimeToWaitForFilesToLoad > 2) {
if (sliderTimer != null) {
clearTimeout(sliderTimer);
TimeToWaitForFilesToLoad = 1;
}
FileCount = 1;
SliderContainer.src = "\AJAX/slider.aspx?max=" + FileCount;
SliderContainer.style.display = 'block';
}
else {
sliderTimer = setTimeout("LoadSlider()", 1 * 1000);
}
}
}
}
function myMainCategoryMoving() {
if (catComView.toLowerCase() == "topper") {
findPosY(document.getElementById("catBallNew"));
findPosX(document.getElementById("catBallNew"));
}
else {
findPosY(document.getElementById("catBall"));
findPosX(document.getElementById("catBall"));
}
document.getElementById("RelatedProductDiv").style.top = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 5))["y"];
document.getElementById("RelatedProductDiv").style.left = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 5))["x"];
document.getElementById("FavouriteProductDiv").style.top = topCategory + 10;
document.getElementById("FavouriteProductDiv").style.left = leftCategory + 5;
document.getElementById("leftbartable").style.top = getDynamicPositions("myMainCategoryMoving", "", topCategory)["y"];
document.getElementById("leftbartable").style.left = leftCategory;
document.getElementById("CompareProductDiv").style.top = topCategory + 10;
document.getElementById("CompareProductDiv").style.left = leftCategory + 5;
}
function LoadProductDocumentFiles() {
if (timer != null) {
clearTimeout(timer);
}
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) {
}
}
var src = "http://" + window.location.host + "/AJAX/ProductDocumentFiles.aspx?product_id=" + CurrentProductID;
window.frames["frame_ProductFiles"].location = src;
LoadSlideShowCommands();
CycleFile();
}
function LoadChildren1(type, params, _URL) {
xType = type;
xParams = params;
x_Url = _URL;
hideWorkFlow();
myMainCategoryMoving();
document.getElementById("DIV_LIST").innerHTML = loadPagesImage;
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").innerHTML = redirectURL;
window.location = _URL;
}
else if (_URL == "javascript:") {
document.getElementById("DIV_LIST").style.display = 'block';
document.getElementById("leftbartable").style.top = topCategory;
document.getElementById("leftbartable").style.left = leftCategory;
sldbox = 2;
var xmlResult;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/NewProPageDis.aspx" + params + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("DIV_LIST").innerHTML = "";
document.getElementById("DIV_LIST").innerHTML = xmlResult;
document.getElementById("leftbartable").style.visibility = "visible";
secCatRes = xmlResult;
SetObjectSize("DIV_LIST", 220, 314);
initArrow('content'); //Calling arrow scrolling to be hidden
simpleTopVar = "showPro";
var firstProduct;
var i = params.indexOf('y')
i = i + 2
var d = params.indexOf('&', i);
var curr = d - i;
firstProduct = params.substr(i, curr);
var _fileURL;
catloadChecker = "Done";
checkMainInterFace();
myMainCategoryMoving();
}
else {
}
}
req.send("");
}
}
}
function nullAllVar() {
rowIdMainLevel2 = null;
catImageIdLevel2 = null;
rowIdMainLevel3 = null;
catImageIdLevel3 = null;
rowIdMainLevel4 = null;
catImageIdLevel4 = null;
rowIdMainLevel5 = null;
catImageIdLevel5 = null;
rowIdMainLevel6 = null;
catImageIdLevel6 = null;
rowIdMainLevel7 = null;
catImageIdLevel7 = null;
rowIdMainLevel8 = null;
catImageIdLevel8 = null;
}
var rowIdMainLevel2; //	Row to be hide
var catImageIdLevel2; 	// Image to be changed
rowIdMainLevel2 = null;
catImageIdLevel2 = null;
function categoryCloser2() {
if (rowIdMainLevel2 != null) {
document.getElementById(rowIdMainLevel2).innerHTML = "";
document.getElementById(rowIdMainLevel2).style.visibility = 'hidden';
pluschange(catImageIdLevel2, rowIdMainLevel2);
rowIdMainLevel2 = null;
catImageIdLevel2 = null;
}
}
var rowIdMainLevel3; //	Row to be hide
var catImageIdLevel3; 	// Image to be changed
rowIdMainLevel3 = null;
catImageIdLevel3 = null;
function categoryCloserlevel3() {
var lvlText;
lvlText = "3";
if (rowIdMainLevel3 != null) {
document.getElementById(rowIdMainLevel3).innerHTML = "";
document.getElementById(rowIdMainLevel3).style.visibility = 'hidden';
pluschange(catImageIdLevel3, rowIdMainLevel3);
rowIdMainLevel3 = null;
catImageIdLevel3 = null;
multipleChanger(lvlText);
activeID_Lvl3 = 0;
}
}
var rowIdMainLevel4; //	Row to be hide
var catImageIdLevel4; 	// Image to be changed
rowIdMainLevel4 = null;
catImageIdLevel4 = null;
function categoryCloserlevel4() {
var lvlText;
lvlText = "4";
multipleChanger(lvlText);
if (rowIdMainLevel4 != null) {
document.getElementById(rowIdMainLevel4).innerHTML = "";
document.getElementById(rowIdMainLevel4).style.visibility = 'hidden';
pluschange(catImageIdLevel4, rowIdMainLevel4);
rowIdMainLevel4 = null;
catImageIdLevel4 = null;
multipleChanger(lvlText);
activeID_Lvl4 = 0;
}
}
var rowIdMainLevel5; //	Row to be hide
var catImageIdLevel5; 	// Image to be changed
rowIdMainLevel5 = null;
catImageIdLevel5 = null;
function categoryCloserlevel5() {
var lvlText;
lvlText = "5";
if (rowIdMainLevel5 != null) {
document.getElementById(rowIdMainLevel5).innerHTML = "";
document.getElementById(rowIdMainLevel5).style.visibility = 'hidden';
pluschange(catImageIdLevel5, rowIdMainLevel5);
rowIdMainLevel5 = null;
catImageIdLevel5 = null;
multipleChanger(lvlText);
activeID_Lvl5 = 0;
rowIdMainLevel6 = null;
catImageIdLevel6 = null;
}
}
var rowIdMainLevel6; //	Row to be hide
var catImageIdLevel6; 	// Image to be changed
rowIdMainLevel6 = null;
catImageIdLevel6 = null;
function categoryCloserlevel6() {
var lvlText;
lvlText = "6";
if (rowIdMainLevel6 != null) {
document.getElementById(rowIdMainLevel6).innerHTML = "";
document.getElementById(rowIdMainLevel6).style.visibility = 'hidden';
pluschange(catImageIdLevel6, rowIdMainLevel6);
rowIdMainLevel6 = null;
catImageIdLevel6 = null;
multipleChanger(lvlText);
activeID_Lvl6 = 0;
rowIdMainLevel7 = null;
catImageIdLevel7 = null;
}
}
var rowIdMainLevel7; //	Row to be hide
var catImageIdLevel7; 	// Image to be changed
rowIdMainLevel7 = null;
catImageIdLevel7 = null;
function categoryCloserlevel7() {
var lvlText;
lvlText = "7";
if (rowIdMainLevel7 != null) {
document.getElementById(rowIdMainLevel7).innerHTML = "";
document.getElementById(rowIdMainLevel7).style.visibility = 'hidden';
pluschange(catImageIdLevel7, rowIdMainLevel7);
rowIdMainLevel7 = null;
catImageIdLevel7 = null;
multipleChanger(lvlText);
activeID_Lvl7 = 0;
rowIdMainLevel8 = null;
catImageIdLevel8 = null;
}
}
var rowIdMainLevel8; //	Row to be hide
var catImageIdLevel8; 	// Image to be changed
rowIdMainLevel8 = null;
catImageIdLevel8 = null;
function categoryCloserlevel8() {
var lvlText;
lvlText = "8";
if (rowIdMainLevel8 != null) {
document.getElementById(rowIdMainLevel8).innerHTML = "";
document.getElementById(rowIdMainLevel8).style.visibility = 'hidden';
pluschange(catImageIdLevel8, rowIdMainLevel8);
rowIdMainLevel8 = null;
catImageIdLevel8 = null;
multipleChanger(lvlText);
activeID_Lvl8 = 0;
}
}
function activeLevelzero() {
activeID = 0;
activeID_Lvl3 = 0;
activeID_Lvl4 = 0;
activeID_Lvl5 = 0;
activeID_Lvl6 = 0;
activeID_Lvl7 = 0;
activeID_Lvl8 = 0;
}
var activeID, activeID_Lvl3, activeID_Lvl4, activeID_Lvl5, activeID_Lvl6, activeID_Lvl7, activeID_Lvl8;
activeID = 0;
activeID_Lvl3 = 0;
activeID_Lvl4 = 0;
activeID_Lvl5 = 0;
activeID_Lvl6 = 0;
activeID_Lvl7 = 0;
activeID_Lvl8 = 0;
function ShowHideInnerLayout(type, params, queryString, rowID, imageid, catlevel, _URL) {
hideWorkFlow();
document.getElementById("HistoryProductDiv").style.display = "none";
document.getElementById("leftbartable").style.display = "block";
document.getElementById("DIV_LIST").style.display = "block";
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").innerHTML = redirectURL;
}
else if (_URL == "javascript:") {
if (type == "Category") {
UnLoadCommands();
if (document.getElementById(rowID + "hidden").style.visibility == 'hidden') {
if (activeID != rowID) {
if ((catlevel != activeID_Lvl3) && (catlevel != activeID_Lvl4) && (catlevel != activeID_Lvl5) && (catlevel != activeID_Lvl6) && (catlevel != activeID_Lvl7) && (catlevel != activeID_Lvl8)) {
document.getElementById(rowID + "hidden").style.visibility = 'visible';
var xmlRes;
document.getElementById(rowID + "hidden").innerHTML = loadPagesImage;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/NewInnerCatPro.aspx" + params, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById(rowID + "hidden").innerHTML = xmlResult;
var firstProduct;
var i = params.indexOf('y')
i = i + 2
var d = params.indexOf('&', i);
var curr = d - i;
firstProduct = params.substr(i, curr);
var _fileURL;
activeID = rowID; // to close the row chk this
showRow = 1;
if (catlevel == 2) {
rowIdMainLevel2 = rowID + "hidden";
catImageIdLevel2 = imageid;
pluschange(catImageIdLevel2, rowIdMainLevel2);
}
else if (catlevel == 3) {
activeID_Lvl3 = catlevel;
rowIdMainLevel3 = rowID + "hidden";
catImageIdLevel3 = imageid;
pluschange(catImageIdLevel3, rowIdMainLevel3);
}
else if (catlevel == 4) {
activeID_Lvl4 = catlevel;
rowIdMainLevel4 = rowID + "hidden";
catImageIdLevel4 = imageid;
pluschange(catImageIdLevel4, rowIdMainLevel4);
}
else if (catlevel == 5) {
activeID_Lvl5 = catlevel;
rowIdMainLevel5 = rowID + "hidden";
catImageIdLevel5 = imageid;
pluschange(catImageIdLevel5, rowIdMainLevel5);
}
else if (catlevel == 6) {
activeID_Lvl6 = catlevel;
rowIdMainLevel6 = rowID + "hidden";
catImageIdLevel6 = imageid;
pluschange(catImageIdLevel6, rowIdMainLevel6);
}
else if (catlevel == 7) {
activeID_Lvl7 = catlevel;
rowIdMainLevel7 = rowID + "hidden";
catImageIdLevel7 = imageid;
pluschange(catImageIdLevel7, rowIdMainLevel7);
}
else if (catlevel == 8) {
activeID_Lvl8 = catlevel;
rowIdMainLevel8 = rowID + "hidden";
catImageIdLevel8 = imageid;
pluschange(catImageIdLevel8, rowIdMainLevel8);
}
}
else {
document.getElementById(rowID + "hidden").innerHTML = "";
document.getElementById(rowID + "hidden").innerHTML = loadPagesImage;
}
}
req.send("");
}
}
else {
multipleChanger(catlevel);
}
}
else {
activeID = 0;
multipleChanger(catlevel);
}
}
else if (document.getElementById(rowID + "hidden").style.visibility == 'visible') {
document.getElementById(rowID + "hidden").innerHTML = "";
document.getElementById(rowID + "hidden").style.visibility = 'hidden';
showRow = 0;
pluschange(imageid, rowID + "hidden");
}
}
else if (type == "Product") {
ProAlert = 1;
FavproductId = ProdId;
CurrentProductID = params;
LoadProductCommands(queryString);
ProAlert = 1;
}
}
}
function multipleChanger(catlevel) {
switch (catlevel) {
case "3":
activeID_Lvl4 = 0
activeID_Lvl5 = 0
activeID_Lvl6 = 0
activeID_Lvl7 = 0
activeID_Lvl8 = 0
break;
case "4":
activeID_Lvl5 = 0
activeID_Lvl6 = 0
activeID_Lvl7 = 0
activeID_Lvl8 = 0
break;
case "5":
activeID_Lvl6 = 0
activeID_Lvl7 = 0
activeID_Lvl8 = 0
break;
case "6":
activeID_Lvl7 = 0
activeID_Lvl8 = 0
break;
case "7":
activeID_Lvl8 = 0
break;
case "8":
break;
}
}
function NewtopMenu1stLevel(type, params) {
var xmlResult;
var xmlRequest = DoCallback(_Domain + "/Catalog/NEw_top1stLevel.aspx", params);
xmlResult = xmlRequest.responseText;
document.getElementById("renderHTML").innerHTML = xmlResult;
var StringToMatch = /\imagehandler.ashx\?type=\D+\&amp;item_id=\d+\&amp;width=\d+\&amp;height=\d+/;
var firstProduct = MatchString(xmlResult, StringToMatch);
SetSource(firstProduct);
document.getElementById("top1stBlank").style.display = 'none';
document.getElementById("top2ndBlank").style.display = 'none';
}
function NewtopSecond(params, notShowCat) {
if (notShowCat == 2) {
document.getElementById("top1stBlank").style.display = 'none';
document.getElementById("top2ndBlank").style.display = 'none';
}
else {
document.getElementById("top1stBlank").style.display = 'block';
document.getElementById("top2ndBlank").style.display = 'block';
}
document.getElementById("topResulthere").innerHTML = loadPagesImage;
var xmlRequest = DoCallback(_Domain + "/Catalog/TopSecondLvl.aspx", params);
xmlRes = xmlRequest.Responsetext;
document.getElementById("topResulthere").innerHTML = xmlRes;
}
function showMenuCatWithAds() {
}
function showMenuWithoutAds() {
}
function Sound() {
if (USE_DATABASE_PRODUCTCOMMANDS) {
var sound_button = document.getElementById("sound_button");
ChangeSound_MainPlayer();
ChangeSound_AudioPlayer();
if (MuteState == true) {
sound_button.src = mute_image;
}
else {
sound_button.src = sound_image;
}
}
else {
var sound_button = document.getElementById("sound_button");
sound_button.onclick = null;
}
}
function ChangeSound_MainPlayer() {
var sBrowser = navigator.userAgent;
if ((sBrowser.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
sBrowser = "IE";
}
else {
sBrowser = "nonIE";
}
var Player = window.frames['frame_details'].document.getElementsByTagName('OBJECT')[0];
if (Player == null) { return; }
if (Player.id == "MediaPlayer") {
if (sBrowser == "IE") {
MuteState = Player.Mute;
}
else {
MuteState = Player.GetMute();
}
if (MuteState == true) {
if (sBrowser == "IE") {
Player.Mute = false;
}
else {
Player.SetMute(false);
}
}
else {
if (sBrowser == "IE") {
Player.Mute = true;
}
else {
Player.SetMute(true);
}
}
}
if (Player.id == "FlashPlayer") {
if (!Player.object.Playing) {
}
else {
}
}
if (Player.id == "QuickTimePlayer") {
MuteState = Player.GetMute();
if (MuteState == true) {
Player.SetMute(false);
}
else {
Player.SetMute(true);
}
}
}
function ChangeSound_AudioPlayer() {
var sBrowser = navigator.userAgent;
if ((sBrowser.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
sBrowser = "IE";
}
else {
sBrowser = "nonIE";
}
var Player = document.getElementsByTagName('OBJECT')[1];
if (Player == null) { return; }
if (Player.id == "AudioWindowsMediaPlayer") {
if (sBrowser == "IE") {
MuteState = Player.Mute;
}
else {
MuteState = Player.GetMute();
}
if (MuteState == true) {
if (sBrowser == "IE") {
Player.Mute = false;
}
else {
Player.SetMute(false);
}
}
else {
if (sBrowser == "IE") {
Player.Mute = true;
}
else {
Player.SetMute(true);
}
}
}
if (Player.id == "AudioFlashPlayer") {
if (!Player.object.Playing) {
}
else {
}
}
if (Player.id == "AudioQuickTimePlayer") {
MuteState = Player.GetMute();
if (MuteState == true) {
Player.SetMute(false);
}
else {
Player.SetMute(true);
}
}
}
function RedirectToCategory(outsider) {
if (outsider > 0)
location.href = "../default.aspx?CategoryID=" + outsider;
}
function RedirectByDefault() {
var query = location.href;
query = query.substring(query.indexOf('?') + 1, query.length);
catid = query.substring(query.indexOf('=') + 1, query.length);
if (catid > 0) {
var xmlResult;
var xmlRequest = DoCallback(_Domain + "/resultCate.aspx?catid=", catid);
xmlResult = xmlRequest.responseText;
topLayerShow();
NewtopMenu1stLevel('Category', xmlResult);
LoadChildren1('Category', xmlResult);
slidebox('slidebox1');
textbar('textbarcol');
}
else if (catid <= 0) {
return;
}
}
function RefreshSoundButton() {
var sound_button = document.getElementById("sound_button");
if (sound_button != null) {
if (MuteState == true) {
sound_button.src = mute_image;
}
else {
sound_button.src = sound_image;
}
}
}
function resizeCheck() {
}
var CatBgColor = new Array(5);
CatBgColor[0] = 0;
CatBgColor[1] = 0;
CatBgColor[2] = 0;
CatBgColor[3] = 0;
CatBgColor[4] = 0;
CatBgColor[5] = 0;
function rowbkgdOver(CatRow) {
for (var i = 0; i <= CatBgColor.length; i++) {
if (CatBgColor[i] == CatRow) {
document.getElementById(CatRow).className = onClickCatBkgd;
return;
}
else (CatBgColor[i] != CatRow)
{
document.getElementById(CatRow).className = onMouseOverCatbkgd;
}
}
}
function rowbkgdOut(CatRow) {
var i;
i = 0;
for (i = 0; i <= CatBgColor.length; i++) {
if (CatBgColor[i] == CatRow) {
document.getElementById(CatRow).className = onClickCatBkgd;
return;
}
else (CatBgColor[i] != CatRow)
{
document.getElementById(CatRow).className = onMouseOutCatbkgd;
}
}
}
function colorChanger(roid, catLevel) {
switch (catLevel) {
case "3":
CatBgColor[0] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
case "4":
CatBgColor[1] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
case "5":
CatBgColor[2] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
case "6":
CatBgColor[3] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
case "7":
CatBgColor[4] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
case "8":
CatBgColor[5] = roid;
document.getElementById(roid).className = onClickCatBkgd;
break;
}
}
function rowProbkgdOver(CatRow) {
if (clikedMouseOver == "clicked") {
clikedMouseOver = null;
}
document.getElementById(CatRow).className = onMouseOverCatbkgd;
}
function hyperLinkColor(hyperlink) {
document.getElementById(hyperlink).className = switchStringForIPhone('CatMouseHoverFontColor', 'CatMouseHoverFontColor_wap');
}
function hyperLinkColorOut(hyperlink) {
document.getElementById(hyperlink).className = switchStringForIPhone('CatMouseOutFontColor', 'CatMouseOutFontColor_wap');
}
function proClikedVar() {
clikedMouseOver = "clicked";
}
function rowProbkgdOut(CatRow) {
document.getElementById(CatRow).className = onMouseOutCatbkgd;
if (clikedMouseOver == "clicked") {
clikedMouseOver = null;
}
else {
var ImagePreviewSetNew = 'false';
var USettings = ReadCookie("usersettings");
if (USettings != '') {
var vars = USettings.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0].toLowerCase() == "productimagepreview") {
ImagePreviewSetNew = pair[1];
}
}
}
if (ImagePreviewSetNew.toLowerCase() == 'true') {
}
}
}
function removeLastRowColor() {
}
function ArrayColorRemove() {
for (var i = 0; i < CatBgColor.length; i++) {
if ((CatBgColor[i] != 0) && (document.getElementById(CatBgColor[i]) != null)) {
document.getElementById(CatBgColor[i]).className = onMouseOutCatbkgd;
CatBgColor[i] = 0;
}
else {
CatBgColor[i] = 0;
}
}
if (ProtdArr != 0) {
document.getElementById(ProtdArr).className = onMouseOutCatbkgd;
ProtdArr = 0;
}
}
function nullMainCatVar() {
for (var i = 0; i < CatBgColor.length; i++) {
if (CatBgColor[i] != 0) {
CatBgColor[i] = 0;
}
}
activeID_Lvl2 = 0;
activeID_Lvl3 = 0;
activeID_Lvl4 = 0;
activeID_Lvl5 = 0;
activeID_Lvl6 = 0;
activeID_Lvl7 = 0;
activeID_Lvl8 = 0;
}
function innerCatColor(newlevel) {
switch (newlevel) {
case "4":
if (CatBgColor[1] != 0) {
document.getElementById(CatBgColor[1]).className = onMouseOutCatbkgd;
}
break;
case "5":
if (CatBgColor[2] != 0) {
document.getElementById(CatBgColor[2]).className = onMouseOutCatbkgd;
}
break;
case "6":
if (CatBgColor[3] != 0) {
document.getElementById(CatBgColor[3]).className = onMouseOutCatbkgd;
}
break;
case "7":
if (CatBgColor[4] != 0) {
document.getElementById(CatBgColor[4]).className = onMouseOutCatbkgd;
}
break;
case "8":
if (CatBgColor[5] != 0) {
document.getElementById(CatBgColor[5]).className = onMouseOutCatbkgd;
}
break;
}
}
var fullPageWidth = screen.width * 0.95;
function defaultPageBanner() {
myMainCategoryMoving();
var screen_height = screen.height;
var screen_width = screen.width;
var IFrame = document.getElementById("frame_details");
var MainTable = document.getElementById("Page_Table");
if ((screen_width <= 1023) || (screen_height <= 767)) {
document.getElementById("Banner_left").style.display = "none";
document.getElementById("Banner_bottom").style.display = "none";
document.getElementById("Banner_right").style.display = "none";
document.getElementById("Banner_right").innerHTML = "";
document.getElementById("ag").style.verticalAlign = "middle";
myMainCategoryMoving();
IFrame.width = "546"
IFrame.height = "314"
}
else if ((screen_width <= 1279) || (screen_height <= 1023)) {
if (resizeInfiniViewWithResolution == false) {
document.getElementById("Banner_right").style.display = "block";
document.getElementById("Banner_right").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='223' height='562'><param name='wmode' value='transparent'><param name='movie' value='../Images_Private/Banner_1024.swf'><param name='quality' value='high'><param name='menu' value='false'><embed src='../Images_Private/Banner_1024.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='223' height='562' wmode='transparent'  ></embed></object>";
IFrame.width = "546";
IFrame.height = "314";
} else {
MainTable.width = fullPageWidth; 	// Returns "972.8" on Resoluation 1024x768;
IFrame.width = "768";
IFrame.height = "235";
IFrame.align = "left";
}
document.getElementById("ag").style.verticalAlign = "middle";
myMainCategoryMoving();
}
else if ((screen_width >= 1280) || (screen_height >= 1024)) {
if (resizeInfiniViewWithResolution == false) {
document.getElementById("Banner_left").style.display = "block";
document.getElementById("Banner_left").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='233' height='758'><param name='wmode' value='transparent'><param name='movie' value='../Images_Private/Banner_1280_left.swf'><param name='quality' value='high'><param name='menu' value='false'><embed src='../Images_Private/Banner_1280_left.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='233' height='758' wmode='transparent'  ></embed></object>";
document.getElementById("Banner_bottom").style.display = "block";
document.getElementById("Banner_bottom").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='784' height='162'><param name='wmode' value='transparent'><param name='movie' value='../Images_Private/Banner_1280_bottom.swf'><param name='quality' value='high'><param name='menu' value='false'><embed src='../Images_Private/Banner_1280_bottom.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='784' height='162' wmode='transparent'  ></embed></object>";
document.getElementById("Banner_right").style.display = "block";
document.getElementById("Banner_right").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='233' height='758'><param name='wmode' value='transparent'><param name='movie' value='../Images_Private/Banner_1280_right.swf'><param name='quality' value='high'><param name='menu' value='false'><embed src='../Images_Private/Banner_1280_right.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='233' height='758' wmode='transparent'  ></embed></object>";
IFrame.width = "546";
IFrame.height = "314";
} else {
MainTable.width = fullPageWidth; 		///"1200"
MainTable.height = screen.height * 0.8; 	// 80% of Screen Resolution
IFrame.width = "960";
IFrame.height = "477";
IFrame.align = "left";
}
myMainCategoryMoving();
document.getElementById("ag").style.verticalAlign = "Top";
}
bannerChecker = "Done";
}
function defaultPageBannerhome() {
var screen_height = screen.height;
var screen_width = screen.width;
var IFrame = document.getElementById("IO_Office_Container");
var MainTable = document.getElementById("Page_Table");
if ((screen_width <= 1023) || (screen_height <= 767)) {
document.getElementById("Banner_left").style.display = "none";
document.getElementById("Banner_bottom").style.display = "block";
document.getElementById("Banner_right").style.display = "none";
document.getElementById("Banner_right").innerHTML = "";
document.getElementById("ag").style.verticalAlign = "middle";
}
else if ((screen_width <= 1279) || (screen_height <= 1023)) {
if (resizeInfiniViewWithResolution == false) {
document.getElementById("Banner_left").style.display = "block";
document.getElementById("Banner_bottom").style.display = "block";
} else {
MainTable.width = fullPageWidth // Returns "972.8" on Resoluation 1024x768;
}
document.getElementById("ag").style.verticalAlign = "middle";
}
else if ((screen_width >= 1280) || (screen_height >= 1024)) {
if (resizeInfiniViewWithResolution == false) {
document.getElementById("Banner_left").style.display = "block";
document.getElementById("Banner_bottom").style.display = "block";
document.getElementById("Banner_right").style.display = "block";
IFrame.width = "780";
IFrame.height = 370;
} else {
MainTable.width = fullPageWidth			///"1200"
MainTable.height = screen.height * 0.8		// 80% of Screen Resolution
}
document.getElementById("ag").style.verticalAlign = "Top";
}
homePagebanner_Process1 = "Done"
defaultPageBannerhome_init();
}
function findPosX(obj) {
if (obj) {
var curleft = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
leftCategory = curleft;
return curleft;
}
}
function findPosY(obj) {
if (obj) {
var curtop = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
topCategory = curtop;
return curtop;
}
}
function SetMediaPlayerSoundStatus() {
var sBrowser = navigator.userAgent;
if ((sBrowser.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
sBrowser = "IE";
}
else {
sBrowser = "nonIE";
}
var Player;
if (window.frames['frame_details'] != null) {
if (window.frames['frame_details'].document.getElementsByTagName('OBJECT') != null) {
Player = window.frames['frame_details'].document.getElementsByTagName('OBJECT')[0];
}
}
if (Player == null) { return; }
if (Player.id == "MediaPlayer") {
if (MuteState == true) {
if (sBrowser == "IE") {
Player.Mute = false;
}
else {
Player.SetMute(false);
}
}
else {
if (sBrowser == "IE") {
Player.Mute = true;
}
else {
Player.SetMute(true);
}
}
}
if (Player.id == "FlashPlayer") {
if (!Player.object.Playing) {
}
else {
}
}
if (Player.id == "QuickTimePlayer") {
if (MuteState == true) {
Player.SetMute(false);
}
else {
Player.SetMute(true);
}
}
}
function SetAudioPlayerSoundStatus() {
var sBrowser = navigator.userAgent;
if ((sBrowser.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
sBrowser = "IE";
}
else {
sBrowser = "nonIE";
}
var Player = document.getElementsByTagName('OBJECT')[1];
if (Player == null) { return; }
if (Player.id == "AudioWindowsMediaPlayer") {
if (MuteState == true) {
if (sBrowser == "IE") {
Player.Mute = false;
}
else {
Player.SetMute(false);
}
}
else {
if (sBrowser == "IE") {
Player.Mute = true;
}
else {
Player.SetMute(true);
}
}
}
if (Player.id == "AudioFlashPlayer") {
if (!Player.object.Playing) {
}
else {
}
}
if (Player.id == "AudioQuickTimePlayer") {
if (MuteState == true) {
Player.SetMute(false);
}
else {
Player.SetMute(true);
}
}
}
var ProtdArr;
ProtdArr = 0;
function catProductBkgdColor(proTdIds) {
if (proTdIds == ProtdArr) {
return;
}
else {
document.getElementById(proTdIds).className = onClickCatBkgd;
}
if (ProtdArr == 0) {
ProtdArr = proTdIds;
}
else if ((ProtdArr != 0) && (document.getElementById(ProtdArr) != null)) {
document.getElementById(ProtdArr).className = onMouseOutCatbkgd;
ProtdArr = proTdIds;
}
}
function productStack(catId, proId) {
params = catId + proId + uAgent;
mp_catid = params + "&mp_catType=2";
document.getElementById("stackText").innerHTML = loadPagesImage;
var xmlRequest = DoCallback(_Domain + "/Catalog/StackProduct.aspx", params);
xmlRes = xmlRequest.responseText;
document.getElementById("stackText").innerHTML = xmlRes;
stackCategories_wap(document.getElementById('stackText').innerText, ">>", 3);
stop();
renderProductAttibute(mp_catid);
}
var stactCatTemp_wap = "";
function stackCat(params) {
if (stackLevel == 0) {
stackParms[0] = params;
stackLevel = 1;
}
else if (stackLevel == 1) {
stackParms[1] = params;
stackLevel = 2;
}
else if (stackLevel == 2) {
stackParms[2] = params;
stackLevel = 3;
}
getIPhoneIViewFor("stackCat");
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/StackCat.aspx" + params + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("stackText").innerHTML = "";
document.getElementById("stackText").innerHTML = xmlResult;
stackCategories_wap(document.getElementById('stackText').innerText, ">>", 3);
}
else {
document.getElementById("stackText").innerHTML = "";
}
}
req.send("");
stop();
}
}
function mainProductStack(mainProId) {
mp_catid = "?" + mainProId + "&mp_catType=1";
var xmlRequest = DoCallback(_Domain + "/Catalog/StackProduct_Main.aspx?", mainProId);
xmlRes = xmlRequest.responseText;
document.getElementById("stackText").innerHTML = xmlRes;
renderProductAttibute(mp_catid);
}
function initXMLHTTPRequest() {
var xRequest = null;
if (window.XMLHttpRequest) {
xRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
xRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xRequest;
}
function ajaxGallery(container, name, galleryCode) {
}
function ShowHideInnerLayoutNew(params, _URL) {
x2Params = params;
x2_Url = _URL;
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").innerHTML = redirectURL;
}
else if (_URL == "javascript:") {
document.getElementById("leftbartable").style.top = topCategory;
document.getElementById("leftbartable").style.left = leftCategory;
sldbox = 2;
var xmlResult;
document.getElementById("DIV_LIST").innerHTML = loadPagesImage;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/New_PreInner_CatPro.aspx" + params + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("DIV_LIST").innerHTML = "";
document.getElementById("DIV_LIST").innerHTML = xmlResult;
SetObjectSize("DIV_LIST", 220, 350);
initArrow('content'); //Calling arrow scrolling to be hidden
initArrow('contentTop'); //Calling top arrow scrolling to be hidden
simpleTopVar = "showPro";
var firstProduct;
var i = params.indexOf('y')
i = i + 2
var d = params.indexOf('&', i);
var curr = d - i;
firstProduct = params.substr(i, curr);
var _fileURL;
catloadChecker = "Done";
checkMainInterFace();
myMainCategoryMoving();
}
else {
document.getElementById("DIV_LIST").innerHTML = loadPagesImage;
}
}
}
req.send("");
}
}
function ShowHideInnerLayoutPre(preCatId) {
document.getElementById(preCatId).style.visibility = 'hidden';
}
function InitializeSlideShow(mediaFiles, audioFiles) {
enableContentDocumentHeight = true;
parent._ProductCommands.SlideShowCommands._MediaFiles = mediaFiles;
parent._ProductCommands.SlideShowCommands._AudioFiles = audioFiles;
parent._ProductCommands.SlideShowCommands.FileCounter = 0;
parent._ProductCommands.SlideShowCommands.Load();
}
var tempProduct;
function RelatedProduct(CurrentproId) {
document.getElementById("FavouriteProductDiv").style.display = "none";
document.getElementById("HistoryProductDiv").style.display = "none";
currentRelatedProId = CurrentproId;
tempProduct = CurrentproId;
var params;
params = "?CurrentProId=" + CurrentproId + uAgent;
document.getElementById("RelatedProductDiv").innerHTML = frameLoading;
var _RelatedResult;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", _Domain + "/AJAX/RelatedProduct.aspx" + params, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
_RelatedResult = xmlResult;
if (xmlResult == "No Data") {
_RelatedResult = xmlResult;
document.getElementById("RelatedProductDiv").style.display = 'none';
}
else {
document.getElementById("RelatedProductDiv").innerHTML = xmlResult;
_resWizardPro = document.getElementById("RelatedProductDiv").innerHTML;
initArrow('reletedProducts');
var lengthArr;
lengthArr = document.getElementById("arrayLength").innerText;
lengthArr = lengthArr;
relatedProductLength = new Array(lengthArr);
for (var i = 0; i < lengthArr; i++) {
if (document.getElementById("RelatedCheckBox" + i) != null) {
if (document.getElementById("RelatedCheckBox" + i).checked == true) {
relatedProductLength[i] = document.getElementById("RelatedCheckBox" + i).value;
}
else {
relatedProductLength[i] = null;
}
}
}
}
chkWizard4_Related(params, _RelatedResult);
}
else {
document.getElementById("RelatedProductDiv").innerHTML = frameLoading;
}
}
req.send("");
}
}
function chkWizard4_Related(params, resultRealted) {
if (USE_DATABASE_PRODUCTCOMMANDS) {
if (resultRealted == "No Data") {
document.getElementById("RelatedProductDiv").style.display = 'none';
}
else if (resultRealted != "No Data") {
document.getElementById("RelatedProductDiv").style.display = 'block';
}
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "AJAX/PreActivateFileCheck.aspx" + params, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
if (xmlResult == "NoWizard," && resultRealted == "No Data") {
document.getElementById("RelatedProductDiv").style.display = 'none';
}
else if (xmlResult == "NoWizard," && resultRealted != "No Data") {
document.getElementById("RelatedProductDiv").style.display = 'block';
}
else if ((xmlResult == "Wizard," || xmlResult == "Wizard,VR") && resultRealted != "No Data") {
_wizardGlobalChk = xmlResult;
_relatedresultchk = resultRealted;
document.getElementById("RelatedProductDiv").style.display = 'block';
}
else if ((xmlResult == "Wizard," || xmlResult == "Wizard,VR") && resultRealted == "No Data") {
_wizardGlobalChk = xmlResult;
_relatedresultchk = resultRealted;
document.getElementById("RelatedProductDiv").style.display = 'none';
}
else if ((xmlResult != "Wizard," || xmlResult != "Wizard,VR") && (resultRealted != "No Data" || resultRealted == "No Data")) {
_wizardGlobalChk = xmlResult;
_relatedresultchk = resultRealted;
document.getElementById("RelatedProductDiv").style.display = 'none';
}
}
}
req.send("");
}
}
}
function relatedProductBarHide() {
var RelatedProductDiv = GlobalObject("RelatedProductDiv");
if (RelatedProductDiv) {
RelatedProductDiv.style.display = 'none';
RelatedProductDiv.innerHTML = "";
}
AttributeHide();
}
function parentStacking(ParentCatId) {
stackLevel = 0;
StackCateCache = ParentCatId;
var req = null;
req = initXMLHTTPRequest();
stop();
if (req) {
req.open("GET", "Catalog/MainCategoryStack.aspx?ParentCategoryID=" + ParentCatId + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
if (GetUAgentMainScript() != "") {
StackSlider.ShowNavigation();
}
xmlResult = req.responseText;
document.getElementById("stackText").innerHTML = xmlResult;
}
else {
}
}
req.send("");
}
}
function chkBoxCheck(chkBoxId, chkBoxChecked, RelatedproductLength) {
var params = "?CurrentProId=" + currentRelatedProId + "&checkboxId=" + chkBoxId + "&checkBoxChecked=" + chkBoxChecked + uAgent;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "AJAX/RelatedProduct_Clicked.aspx" + params, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("RelatedProductDiv").innerHTML = xmlResult;
var lengthArr;
if (document.getElementById("arrayLength").innerText != undefined) {
lengthArr = document.getElementById("arrayLength").innerText;
} else {
lengthArr = document.getElementById("arrayLength").textContent;
}
var lengthArr = parseInt(lengthArr);
if (lengthArr > 0) {
relatedProductLength = new Array(lengthArr);
for (var i = 0; i < lengthArr; i++) {
if (document.getElementById("RelatedCheckBox" + i).checked == true) {
relatedProductLength[i] = document.getElementById("RelatedCheckBox" + i).value;
}
else {
relatedProductLength[i] = null;
}
}
slideShowTotal();
}
initArrow('reletedProducts');
}
else {
}
}
req.send("");
stop();
}
}
function slideShowTotal() {
document.getElementById("slidetotal").innerHTML = "";
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/totalPriceShow.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("slidetotal").innerHTML = xmlResult;
}
else {
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
stop();
}
}
function OnEnterKey(evt) {
var e;
if (typeof (e) == "undefined" && typeof (window.event) != "undefined") {
e = window.event;
}
else {
e = evt;
}
if (typeof (window.event) != "undefined") {
if (e.keyCode == 13) {
e.cancelBubble = true;
if (GetUAgentMainScript() != "") {
SearchProducts_WAP();
}
else {
SearchProducts();
}
}
}
else {
if (e.keyCode == 13) {
e.stopPropagation();
if (GetUAgentMainScript() != "") {
SearchProducts_WAP();
}
else {
SearchProducts();
}
}
}
}
function SetRelatedBack() {
if (SetRelative == '2') {
SetRelative = '1';
}
}
function homeRedirect() {
switchRedirection('../default.aspx', '../waptxt_default.aspx');
}
function parentURL() {
if (framehistory == "undefined") {
try {
framehistory = window.frames["frame_details"].location.href;
}
catch (ex) {
}
}
}
function re_ParentProduct() {
if ((BackProImg == "ProImg") && (framehistory != "undefined")) {
window.frames["frame_details"].location.replace(framehistory);
framehistory = "undefined";
}
}
function BackPro() {
BackProImg = "ProImg";
}
function myinit() {
if ((homePagebanner_Process1 == "Process") && (homePagebanner_Process2 == "Process")) {
}
else if ((homePagebanner_Process1 == "Done") && (homePagebanner_Process2 == "Done")) {
}
}
function LoadProductCmdAgain() {
LoadSlideShowCommands();
}
function LoadQuestionCommands_ActivationProducts() {
var xmlRequest = DoCallback(_Domain + "/AJAX/QuestionCommands_AP.aspx", "");
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
if (_wizardGlobalChk == "Wizard,WithOutSearch" || _wizardGlobalChk == "Wizard,WithSearch") {
FinalRelatedProduct(currentRelatedProId);
}
}
function FinalRelatedProduct(CurrentproId) {
if (BackProImg != "ProImg") {
var params;
params = "?CurrentProId=" + CurrentproId + uAgent;
document.getElementById("RelatedProductDiv").style.top = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 10))["y"];
document.getElementById("RelatedProductDiv").style.left = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 5))["x"];
document.getElementById("RelatedProductDiv").innerHTML = frameLoading;
var _RelatedResult;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", _Domain + "/AJAX/RelatedProduct.aspx" + params, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
if (xmlResult == "No Data") {
_RelatedResult = xmlResult;
document.getElementById("RelatedProductDiv").style.display = 'none';
}
else {
document.getElementById("RelatedProductDiv").style.display = "block";
document.getElementById("RelatedProductDiv").innerHTML = xmlResult;
initArrow('reletedProducts');
var lengthArr;
lengthArr = document.getElementById("arrayLength").innerText;
lengthArr = lengthArr;
relatedProductLength = new Array(lengthArr);
for (var i = 0; i < lengthArr; i++) {
if (document.getElementById("RelatedCheckBox" + i).checked == true) {
relatedProductLength[i] = document.getElementById("RelatedCheckBox" + i).value;
}
else {
relatedProductLength.splice(0, 1);
}
}
}
}
else {
document.getElementById("RelatedProductDiv").innerHTML = frameLoading;
}
}
req.send("");
BackProImg = "ProImginit";
}
}
else {
BackProImg = "ProImginit";
}
}
function LoadCommands_DomainRegistration(arg) {
var xmlRequest;
if (arg != null) {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_DomainRegistration.aspx", "?product_id=" + CurrentProductID + "&WithProceed=true");
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_DomainRegistration.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice + "&WithProceed=true");
}
}
else {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_DomainRegistration.aspx", "?product_id=" + CurrentProductID);
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_DomainRegistration.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice);
}
}
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
function LoadCommands_CompanyFormation(arg) {
var xmlRequest;
if (arg != null) {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_CompanyFormation.aspx", "?product_id=" + CurrentProductID + "&WithProceed=true");
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_CompanyFormation.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice + "&WithProceed=true");
}
}
else {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_CompanyFormation.aspx", "?product_id=" + CurrentProductID);
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_CompanyFormation.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice);
}
}
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
function ProcessCommand(arg) {
if (arg == "CheckCompany") {
var companyName = GetBrowserIndendentElementForDocument(window.top.frames["frame_details"].document, "companyName")
if (companyName == null || companyName == "") {
window.alert("Please Enter Valid Company Name");
parent.ShowHideProductCommands('Product', parent.CurrentProductID, '?product_id=' + parent.CurrentProductID, null, 'search');
parent.document.getElementById("RelatedProductDiv").style.display = 'none';
return;
}
else {
parent.ShowHideProductCommands('Product', parent.CurrentProductID, '?product_id=' + parent.CurrentProductID, null, 'search');
parent.document.getElementById("RelatedProductDiv").style.display = 'none';
return;
}
}
if (arg == "ProceedCompany") {
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
return;
}
if (arg == "Check") {
var domainName = window.top.frames["frame_details"].document.getElementById("UIMainForm").domainname.value;
var domainPattern = new RegExp("^[a-zA-Z0-9\-]+$");
if (domainName.match(domainPattern) == null) {
window.alert("Please Enter Valid Domain Name");
return;
}
else {
FinalRelatedProduct(currentRelatedProId);
Onrelatedpro();
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
return;
}
}
var DomainStatus;
var DomainName;
if (arg == "Proceed") {
var RequestedDomains = window.top.frames["frame_details"].document.getElementById("UIMainForm").RequestedDomains;
if (RequestedDomains.length != null) {
for (i = 0; i < RequestedDomains.length; i++) {
var SelectedDomain = RequestedDomains[i];
DomainStatus = SelectedDomain.checked;
if (DomainStatus == true) {
DomainName = SelectedDomain.value;
break;
}
}
}
else {
DomainStatus = RequestedDomains.checked;
if (DomainStatus == true) {
DomainName = RequestedDomains.value;
}
}
if (DomainStatus) {
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
return;
}
else {
window.alert("Please Select Desired Domain Name or Search for a new domain!");
return;
}
}
}
function Onrelatedpro() {
if ((_wizardGlobalChk == "Wizard,WithOutSearch" || _wizardGlobalChk == "Wizard,WithSearch") && _relatedresultchk != "No Data") {
document.getElementById("RelatedProductDiv").style.display = 'block';
}
else {
document.getElementById("RelatedProductDiv").style.display = 'none';
}
if (GetUAgentMainScript() == "") {
myMainCategoryMoving();
}
}
function totalPriceRemover() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "AJAX/remove_total.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
}
else {
}
}
req.send("");
}
}
function CheckEQuoteQueryString() {
var Customer = queryString("customer");
var Product = queryString("product");
var Action = queryString("action");
if (Customer != "false" && Product != "false" && Action != "false") {
var request = new XMLHttpRequest();
if (request) {
request.onreadystatechange = function () {
if (request.readyState == 4) {
document.getElementById("DIV_LIST").innerHTML = request.responseText;
document.getElementById("DIV_LIST").style.visibility = 'visible';
SetObjectSize("DIV_LIST", 226, 100);
initArrow('searchRes');
topLayerShow();
CurrentProductID = Product;
DisplayEQuoteProduct(CurrentProductID);
}
}
request.open('POST', EQuotePage + "?customer=" + Customer + "&product=" + Product + "&action=" + Action);
request.send("");
}
return true;
}
else {
return false;
}
}
function LoadInfiniOffice() {
var d = new Date();
var Day = d.getDate();
var Month = d.getMonth();
var year = d.getFullYear();
var hour = d.getHours();
var min = d.getMinutes();
var sec = d.getSeconds();
var milisec = d.getMilliseconds();
InfiniOfficePage = InfiniOfficePage + '?t=' + Day + Month + year + hour + min + sec + milisec;
if (window.location.search.length > 0) {
InfiniOfficePage = InfiniOfficePage + "&" + window.location.search.substring(1);
}
var request = initXMLHTTPRequest();
GetBrowserIndependentElement("Container_InfiniOffice").style.visibility = 'visible';
if (request) {
request.onreadystatechange = function () {
if (request.readyState == 4) {
GetBrowserIndependentElement("Container_InfiniOffice").innerHTML = request.responseText;
}
else {
GetBrowserIndependentElement("Container_InfiniOffice").innerHTML = loadPagesImageNew;
}
}
request.open('GET', InfiniOfficePage, true);
if (BrowserDetect.browser != "Safari" && BrowserDetect.browser != "Opera") {
}
request.send("");
}
}
function LoadTicketInfiniOffice() {
var ProID = getQueryVariable(window.location.search.substring(1), "ProductID");
var request = initXMLHTTPRequest();
GetBrowserIndependentElement("Container_InfiniOffice").style.visibility = 'visible';
if (request) {
request.onreadystatechange = function () {
if (request.readyState == 4) {
GetBrowserIndependentElement("Container_InfiniOffice").innerHTML = request.responseText;
}
else {
GetBrowserIndependentElement("Container_InfiniOffice").innerHTML = loadPagesImageNew;
}
}
request.open('POST', '../mobile/InfiniOfficeTicket.aspx?ProductID=' + ProID, true);
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
if (BrowserDetect.browser != "Safari" && BrowserDetect.browser != "Opera") {
request.setRequestHeader("Content-length", 0);
request.setRequestHeader("Connection", "close");
}
request.send("");
}
}
function catImageChange(catId, imageUrl, status, catPathId) {
if (status == "hover") {
if (_mainCateId != null) {
_mainCateId.src = '../cat_files/' + _mainCatImage + '/cat_textImg/simple.gif';
_mainCateId = null;
}
else {
catId.src = imageUrl;
_mainCateId = catId;
}
_mainCatImage = catPathId;
}
}
function testredirect(_URLME) {
window.location.href = _URLME;
}
function CalculateAmount_WizardProduct(WizardID) {
try {
if (parent.WizardLevelCount > 0) {
var LinkCode = "";
for (var counter = 1; counter <= parent.WizardLevelCount; counter++) {
var WizardControl;
WizardControl = GetBrowserIndendentElementForDocument(parent.window.frames["frame_details"].document, WizCtrlName + "_ddl_" + counter.toString());
if (WizardControl == null) {
WizardControl = GetBrowserIndendentElementForDocument(parent.window.frames["frame_details"].document, WizCtrlName + "_rbl_" + counter.toString());
}
switch (WizardControl.id.substr(WizCtrlName.length, 5)) {
case "_ddl_":
LinkCode += "." + GetComboValue(WizardControl);
break;
case "_rbl_":
LinkCode += "." + GetRadioButtonListValue(WizardControl);
break;
}
}
var url = "http://" + location.hostname + "/Utility.asmx";
var params = "<WizardID>" + WizardID.toString() + "</WizardID><LinkCode>" + LinkCode.toString() + "</LinkCode><ProductID>" + parent.CurrentProductID + "</ProductID>";
var xmlRequest = RemoteCallWebService(url, "business4less.com", "GetProductPrice_WizardProduct", params);
var TotalAmount = ParseXMLResponse(xmlRequest);
var HTML_Control_For_TotalAmount = GetBrowserIndendentElementForDocument(parent.window.frames["frame_details"].document, "TotalAmount");
if (HTML_Control_For_TotalAmount != null) {
HTML_Control_For_TotalAmount.innerHTML = TotalAmount.toString();
}
}
}
catch (ex) {
alert(GetErrorMessage(ex));
}
}
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;
}
else {
return 0;
}
}
catch (ex) {
alert(ex.toString());
return 0;
}
}
function GetRadioButtonListValue(radiobuttonlist) {
try {
var selOpt;
var OptionStatus;
for (i = 0; i < radiobuttonlist.rows.length; i++) {
selOpt = radiobuttonlist.rows(i).cells(0).childNodes(0)
OptionStatus = selOpt.checked;
if (OptionStatus == true) {
return selOpt.value;
break;
}
}
}
catch (ex) {
alert(ex.toString());
return 0;
}
}
function ChangeDefaultSelectedCountry() {
try {
if (parent.WizardLevelCount > 0) {
for (var counter = 1; counter <= parent.WizardLevelCount; counter++) {
var WizardControl;
WizardControl = GetBrowserIndendentElementForDocument(parent.window.frames["frame_details"].document, WizCtrlName + "_ddl_" + counter.toString());
if (WizardControl != null) {
switch (WizardControl.id.substr(WizCtrlName.length, 5)) {
case "_ddl_":
var selIndex = CheckComboOptions(WizardControl);
if (selIndex != null) {
WizardControl.options[selIndex].selected = true;
var staticBody = 'function anonymous()';
var functionBody = WizardControl.onchange.toString();
var firstBracket = functionBody.indexOf("{");
functionBody = functionBody.substring(firstBracket + 1, functionBody.length - 1)
setTimeout(functionBody, 500);
}
break;
}
}
}
}
}
catch (ex) {
alert(GetErrorMessage(ex));
}
}
function CheckComboOptions(combo) {
try {
for (var i = 0; i < combo.options.length; i++) {
if (combo.options[i].text.toUpperCase() == 'UNITED KINGDOM') {
return i;
}
}
return null;
}
catch (ex) { alert(ex.toString()); }
}
function DisplayEQuoteProduct(ProductID) {
spaceRow();
ShowHideProductCommands('Product', ProductID, '?product_id=' + ProductID, ProductID, 'search');
downslide();
}
function backButtonOverride() {
setTimeout("backButtonOverrideBody()", 1);
}
function backButtonOverrideBody() {
try {
history.forward();
} catch (e) {
}
setTimeout("backButtonOverrideBody()", 500);
}
function PopupWin(URL, HT, WD) {
var winname = 'Contact_Us' + Math.floor(Math.random() * 11);
window.open(URL, winname, "menubar=no,location=no,resizable=no,scrollbars=no,status=no, height=" + HT + " , width=" + WD + "");
}
function GetURL(P_URLID) {
window.location = "../default.aspx?ProURL_ID=" + P_URLID;
}
function GetSharedURL() {
try {
SetSourceWithCommands('../AJAX/Shared_URL.aspx?Pro_ID_New=' + CurrentProductID);
}
catch (err) {
}
}
function SetURL() {
document.getElementById("SharedURL1_Pro_Name").style.display = "none";
var SURL = window.location.href;
var SPUrl_New = SURL.split("?");
for (var i = 0; i < SPUrl_New.length; i++) {
var spair = SPUrl_New[i].split("=");
if (spair[0] == "Pro_ID_New" || spair[0] == "pro_id_new") {
var Pro_NewID = spair[1];
}
}
Pro_NewID = spair[1];
Comp_URL = "http://" + fullDomainName + "/default.aspx?ProURL_ID=" + Pro_NewID;
Comp_URL_Fav = "http://" + fullDomainName + "/default.aspx?ProURL_ID=" + Pro_NewID;
var U_ID = document.getElementById("SLink");
if (U_ID) {
document.getElementById("SLink").innerHTML = Comp_URL;
}
}
function BookMarkUrl() {
var P_Nm;
P_Nm = document.getElementById("SharedURL1_Pro_Name").value;
var SURL = window.location.href;
var SPUrl_New = SURL.split("?");
for (var i = 0; i < SPUrl_New.length; i++) {
var spair = SPUrl_New[i].split("=");
if (spair[0] == "Pro_ID_New" || spair[0] == "pro_id_new") {
var Pro_NewID = spair[1];
}
}
Pro_NewID = spair[1];
var DOM = document.domain;
var SpDOM = DOM.split(".");
URL_Fav = Comp_URL_Fav;
addtoLayout = '1';
addtoMethod = 1; 					     // addtoMethod: 0=direct link, 1=popup
AddURLSimple = Comp_URL;
AddURL = encodeURIComponent(Comp_URL); // could be set dynamically to your blog post's permalink
AddTitle = escape(SpDOM[0]);        // same here, this could be set dymaically instead of the page's current title
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = AddTitle.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0) {
for (index = 0; index < strLen; index++) {
if (index == 0) {
tmpChar = tmpStr.substring(0, 1).toUpperCase();
postString = tmpStr.substring(1, strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index + 1);
if (tmpChar == " " && index < (strLen - 1)) {
tmpChar = tmpStr.substring(index + 1, index + 2).toUpperCase();
preString = tmpStr.substring(0, index + 1);
postString = tmpStr.substring(index + 2, strLen);
tmpStr = preString + tmpChar + postString;
}
}
}
}
AddTitle = tmpStr;
AddTitle = AddTitle + " - " + P_Nm;
}
function addfav() {
BookMarkUrl();
parent.window.external.AddFavorite(URL_Fav, AddTitle);
}
function H_MenuControlHeading(cat) {
var currentCat;
currentCat = "?currentCat=" + cat;
var req = null;
req = initXMLHTTPRequest();
downLayer = "blank";
if (req) {
req.open("POST", "AJAX/h_Cat_main.aspx" + currentCat, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
document.getElementById("stackText").innerHTML = "";
document.getElementById("stackText").innerHTML = req.responseText;
h_Initialize();
}
else {
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
var downLayer;
downLayer = "blank";
function H_MenuControlDown(cat) {
var h_yPos;
var h_xPos;
h_yPos = findPosY(document.getElementById("stackText"));
h_xPos = findPosX(document.getElementById("stackText"));
document.getElementById("h_dropdown").style.top = h_yPos + 20;
document.getElementById("h_dropdown").style.left = h_xPos;
document.getElementById("h_dropdown").style.display = "block";
document.getElementById("h_dropdown").innerHTML = loadPagesImage;
var currentCat;
currentCat = "?currentCat=" + cat;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/h_Cat_down.aspx" + currentCat, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
document.getElementById("h_dropdown").style.top = h_yPos + 20;
document.getElementById("h_dropdown").style.left = h_xPos;
document.getElementById("h_dropdown").style.display = "block";
document.getElementById("h_dropdown").innerHTML = req.responseText;
downLayer = "data";
}
else {
document.getElementById("h_dropdown").style.top = h_yPos + 20;
document.getElementById("h_dropdown").style.left = h_xPos;
document.getElementById("h_dropdown").style.display = "block";
document.getElementById("h_dropdown").innerHTML = loadPagesImage;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function h_Menuhide() {
if (downLayer == "data") {
document.getElementById("h_dropdown").style.display = "none";
}
else if (downLayer == "blank") {
document.getElementById("h_dropdown").style.display = "block";
}
}
function horizontal_Menuhide() {
if (document.getElementById("h_dropdown").style.display == "block") {
document.getElementById("h_dropdown").style.display = "none";
}
}
function h_MenuhideOnProduct() {
document.getElementById("h_dropdown").innerHTML = "";
document.getElementById("h_dropdown").style.display = "none";
}
function h_Initialize() {
if (dom) {
layer = document.getElementById("h_contectText").getElementsByTagName("table");
layer['h_contectFirst'].style.visibility = "visible";
layer['h_contectFirst'].style.left = 0;
}
else if (ns4) {
layer = "document['h_contectText'].document";
eval(layer + "['h_contectFirst']" + '.visibility = "visible"');
eval(layer + "['h_contectFirst']" + '.left = -15');
}
}
function h_scroll(direction, speed) {
if (dom) {
var layertop = parseInt(layer[present].style.left);
var h_scrollheight = (document.getElementById('h_contectText').offsetWidth - layer[present].offsetWidth);
}
else if (ns4) {
var layertop = parseInt(document['h_contectText'].document[present].left);
var h_scrollheight = (document['h_contectText'].clip.width - document['h_contectText'].document[present].clip.width);
}
if (direction == "left" && layertop - 10 > h_scrollheight) {
if (dom)
layer[present].style.left = (layertop - speed) + "px";
else if (ns4)
document['h_contectText'].document[present].top = (layertop - speed);
}
else if (direction == "right" && layertop < -10) {
if (dom)
layer[present].style.left = (layertop + speed) + "px";
else if (ns4)
document['h_contectText'].document[present].right = (layertop + speed);
}
timer = setTimeout("h_scroll('" + direction + "', " + speed + ")", 10);
}
function h_stop() {
clearTimeout(timer);
}
function H_MenuHeadChng(cat, _URL) {
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("stackText").innerHTML = redirectURL;
window.location.href = _URL;
document.getElementById("h_dropdown").style.display = "none";
}
else if (_URL == "javascript:") {
var currentCat;
currentCat = "?currentCat=" + cat;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/h_Cat_upClicked.aspx" + currentCat, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
document.getElementById("stackText").innerHTML = "";
document.getElementById("stackText").innerHTML = req.responseText;
}
else {
document.getElementById("stackText").innerHTML = loadPagesImage;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("")
}
}
}
function H_MenuBackButton(myID, parentId) {
if (parentId == 1 || parentId == "root") {
H_MenuControlHeading(parentId)
}
else {
H_MenuHeadChng(parentId, "javascript:");
}
}
function chngCatImageHvr(h_catIMG) {
var Cat_img_src;
Cat_img_src = "../images/H_Menu_Images/category_bullet_over.jpg"
document.getElementById(h_catIMG).src = Cat_img_src;
}
function chngCatImageOut(h_catIMG) {
var Cat_img_src;
Cat_img_src = "../images/H_Menu_Images/category_bullet.jpg"
document.getElementById(h_catIMG).src = Cat_img_src;
}
function chngProImageHvr(h_catIMG) {
var Cat_img_src;
Cat_img_src = "../images/H_Menu_Images/product_bullet_hover.jpg"
document.getElementById(h_catIMG).src = Cat_img_src;
}
function chngProImageOut(h_catIMG) {
var Cat_img_src;
Cat_img_src = "../images/H_Menu_Images/product_bullet.jpg"
document.getElementById(h_catIMG).src = Cat_img_src;
}
function GetFavProductId() {
try {
var UL = parent.window.frames["frame_details"].location.href;
var SPUrl = UL.split("/");
var Pro_NewID = SPUrl[4];
}
catch (err) {
}
}
function SetCookie() {
if (arguments.length < 2) { return; }
var n = arguments[0];
var v = arguments[1];
var d = 0;
if (arguments.length > 2) { d = parseInt(arguments[2]); }
var exp = '';
if (d > 0) {
var now = new Date();
then = now.getTime() + (d * 24 * 60 * 60 * 1000);
now.setTime(then);
exp = '; expires=' + now.toGMTString();
}
document.cookie = n + "=" + escape(String(v)) + '; path=/' + exp;
}
function ReadCookie(n) {
var cookiecontent = new String();
if (document.cookie.length > 0) {
var cookiename = n + '=';
var cookiebegin = document.cookie.indexOf(cookiename);
var cookieend = 0;
if (cookiebegin > -1) {
cookiebegin += cookiename.length;
cookieend = document.cookie.indexOf(";", cookiebegin);
if (cookieend < cookiebegin) { cookieend = document.cookie.length; }
cookiecontent = document.cookie.substring(cookiebegin, cookieend);
}
}
return unescape(cookiecontent);
}
function setCookie() {
var acookie = ReadCookie("infiniCookie");
return Parser(acookie);
}
function Parser(str) {
var parseCookie = new String(str)
if (parseCookie != "") {
var splitCookie = parseCookie.split("=");
var parseUserId = splitCookie[1].split("&");
var parseJabberId = splitCookie[3]
var visterID = parseUserId[0];
postURL(visterID)
}
}
function postURL(visiterId) {
var tempurl, tempStr, strLth;
var newlth;
tempurl = document.location.href;
tempurl = tempurl.substring(7, tempurl.length);
var tempStr = tempurl.split("/");
var value = window.location.protocol + "//" + window.location.host + "/tracker/tracker.aspx?referrer=" + escape(document.referrer);
var docLocation = document.location.href;
value += "&customerId=" + visiterId;
if (readJabberCookie("InfiniCustomerJabberId") != null) {
docLocation += "&customerId=" + visiterId + "&customerJID=" +
readJabberCookie("InfiniCustomerJabberId") + "&operatorJID=" +
readJabberCookie("InfiniCustomerOpreatorId");
}
value += "&location=" + escape(docLocation);
var html_doc = document.getElementsByTagName("head").item(0);
var scriptTag = document.createElement("SCRIPT");
scriptTag.src = value;
html_doc.appendChild(scriptTag);
}
function favProductRender() {
document.getElementById("HistoryProductDiv").style.display = "none";
favTop = getDynamicPositions("hisProductRender")["y"];
favLeft = getDynamicPositions("hisProductRender")["x"];
document.getElementById("FavouriteProductDiv").style.top = favTop + 10;
document.getElementById("FavouriteProductDiv").style.left = favLeft + 5;
document.getElementById("FavouriteProductDiv").style.display = "block";
document.getElementById("FavouriteProductDiv").innerHTML = frameLoading;
if (GetUAgentMainScript() == '') {
document.getElementById("DIV_LIST").style.display = "none";
}
document.getElementById("RelatedProductDiv").style.display = "none";
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "/AJAX/FavBarResult.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("FavouriteProductDiv").innerHTML = xmlResult;
initArrow('FavProducts');
}
else {
document.getElementById("FavouriteProductDiv").innerHTML = frameLoading;
}
}
req.send("");
}
}
function CheckBrowser(chkTOP) {
catComView = chkTOP;
var version = 0
var browserName = navigator.appName;
if (navigator.appVersion.indexOf("MSIE") != -1) {
temp = navigator.appVersion.split("MSIE")
version = parseFloat(temp[1])
}
if (browserName == "Microsoft Internet Explorer" && version >= 5.5) {
init();
myMainCategoryMoving();
renderFavouriteBar();
renderHistoryBar();
ContactInfo();
SelectDefaultLanguage();
}
else {
document.getElementById("CheckBrowser").style.display = "block";
}
}
function hisProductRender() {
FrameSize('');
favTop = getDynamicPositions("hisProductRender")["y"];
favLeft = getDynamicPositions("hisProductRender")["x"];
document.getElementById("HistoryProductDiv").innerHTML = frameLoading;
document.getElementById("FavouriteProductDiv").style.display = "none";
document.getElementById("DIV_LIST").style.display = "none";
document.getElementById("RelatedProductDiv").style.display = "none";
document.getElementById("leftbartable").style.display = "none";
document.getElementById("HistoryProductDiv").style.top = favTop + 10;
document.getElementById("HistoryProductDiv").style.left = favLeft + 5;
document.getElementById("HistoryProductDiv").style.display = "block";
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/HistoryResult.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("HistoryProductDiv").innerHTML = xmlResult;
initArrow('HistoryProducts');
}
else {
document.getElementById("HistoryProductDiv").innerHTML = frameLoading;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function closeHistoryInner() {
if (historySessoin == "open") {
historySessoin = "close";
}
}
var historySessoin, oldtrseeionid, historyTd;
historySessoin = "close";
oldtrseeionid = null;
function historyInnerProducts(trSession, tdSession) {
if (oldtrseeionid != null) {
document.getElementById(oldtrseeionid).style.display = 'none'
}
if (oldtrseeionid != tdSession) {
oldtrseeionid = null;
}
if (historySessoin == "open") {
document.getElementById(tdSession).style.display = "none";
imgchkHistory = 0;
historySessoin = "close";
}
if ((historySessoin == "close") && (oldtrseeionid != tdSession) && (imgchkHistory == 0)) {
document.getElementById(tdSession).style.display = 'block';
document.getElementById(tdSession).innerHTML = frameLoading;
oldtrseeionid = tdSession;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/HistoryInnerResult.aspx?prosess=" + trSession, true);
req.onreadystatechange = function () {
var ready = req.readyState;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById(tdSession).innerHTML = xmlResult;
historySessoin = "open";
}
else {
document.getElementById(tdSession).innerHTML = frameLoading;
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
}
function pluschangeHistory(imID) {
if (imgchkHistory == 1) {
historySessoin = "close";
imgchkHistory = 0;
oldtrseeionid = null;
if (imgchkHistoryId != imID) {
imgchkHistory = 0;
imgchkHistoryId = imID;
historySessoin = "close"
}
}
else {
imgchkHistory = 1;
imgchkHistoryId = imID;
}
}
var idHis;
idHis = null;
function historyPlusChng(imID) {
if (idHis == imID) {
var imgOld = document.getElementById(idHis);
imgOld.src = catPlusPic;
idHis = null;
oldtrseeionid = null;
}
else if (idHis != imID) {
var img = document.getElementById(imID);
img.src = catMinusPic;
if (idHis != null) {
var imgOld = document.getElementById(idHis);
imgOld.src = catPlusPic;
}
idHis = imID
}
}
function HistoryrowProbkgdOver(CatRow) {
document.getElementById(CatRow).className = onMouseOverCatbkgd;
}
function HistoryrowProbkgdOut(CatRow) {
document.getElementById(CatRow).className = onMouseOutCatbkgd;
}
function HistoryrowTextOver(CatRow) {
document.getElementById(CatRow).className = switchStringForIPhone('CatMouseHoverFontColor', 'CatMouseHoverFontColor_wap');
}
function HistoryrowTextOut(CatRow) {
document.getElementById(CatRow).className = switchStringForIPhone('CatMouseOutFontColor', 'CatMouseOutFontColor_wap');
}
function pluschangeHistoryInner(imID) {
if (imgchkHistory == 1) {
var img = document.getElementById(imgchkHistoryId);
img.src = catPlusPic;
}
}
function hideHistoryRight() {
if (document.getElementById("HistoryProductDiv").style.display == "block") {
document.getElementById("HistoryProductDiv").style.display = "none";
document.getElementById("leftbartable").style.display = "block";
}
}
function viewDefaultCategories() {
document.getElementById("HistoryProductDiv").style.display = "none";
if (document.getElementById('leftbartable').style.display == "none") {
document.getElementById('leftbartable').style.display = "block";
}
if (document.getElementById('DIV_LIST').style.display == "none") {
document.getElementById('DIV_LIST').style.display = "block";
}
}
function ContactInfo() {
}
function fullViewWithURLs() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "AJAX/CheckFullScreen.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
var Result = req.responseText;
Result = Result.replace(/^\s+|\s+$/g, "");
if (Result.toLowerCase() == 'y') {
resizeInfiniViewWithResolution = true;
}
else {
resizeInfiniViewWithResolution = false;
}
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function CateFilesWithResoltuion(src) {
var splitSrc, fileName, newPattren, newCatURL, getResoluation;
getResoluation = ValidResoltuion()
if ((resizeInfiniViewWithResolution == true) && (src.match(".aspx") == null)) {
splitSrc = src.split("/");
fileName = splitSrc[splitSrc.length - 1];
newPattren = getResoluation + "/" + fileName;
newCatURL = src.replace(fileName, newPattren);
return newCatURL;
}
splitSrc = src.split("/");
fileName = splitSrc[splitSrc.length + 1];
newPattren = getResoluation + "/" + fileName;
newCatURL = src.replace(fileName, newPattren);
return newCatURL;
}
function ValidResoltuion() {
if (GetUAgentMainScript() != "") {
return "250x250";
}
else {
if (catComView.toLowerCase() == "topper") {
return "855x475";
}
else {
if ((screen.width <= 1023) || (screen.height <= 767)) { return "800x600"; }
else if ((screen.width <= 1279) || (screen.height <= 1023)) { return "1024x768"; }
else { return "1280x1024"; }
}
}
}
function GetQueryStringValue(_QueryString, _Key) {
var page = new PageQuery(_QueryString);
return unescape(page.getValue(_Key));
}
function getJID(JID, operatorJID) {
createJabberCookie("InfiniCustomerJabberId", JID, 7)
createJabberCookie("InfiniCustomerOpreatorId", operatorJID, 7)
setCookie();
}
function createJabberCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
function readJabberCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function Framesize_Security() {
if (resizeInfiniViewWithResolution == false) {
var screen_height = screen.height;
var screen_width = screen.width;
if ((screen_width <= 1023) || (screen_height <= 767)) {
document.getElementById("bottomtbl").style.display = "none";
FSIFrameSize(780, 435);
}
else if ((screen_width <= 1279) || (screen_height <= 1023)) {
document.getElementById("bottomtbl").style.display = "none";
FSIFrameSize(780, 435);
}
else if ((screen_width >= 1280) || (screen_height >= 1024)) {
document.getElementById("bottomtbl").style.display = "none";
FSIFrameSize(780, 435);
}
}
}
function productQuerryURL(querryURL) {
if (querryURL != "noURL") {
var Newquery = querryURL.split("?");
for (u = 0; u < Newquery.length; u++) {
var vars = Newquery[u].split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0].toLowerCase() == "view") {
productView(pair[1], querryURL);
}
}
}
}
}
function productView(viewName, ViewURL) {
switch (viewName.toLowerCase()) {
case "samewindow":
parent.window.location.href = ViewURL;
break;
case "newwindow":
window.open(ViewURL, '', 'left=0,top=0,screenX=0,screenY=0,toolbar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes');
break;
case "infiniview":
break;
case "nourl":
break;
}
}
function disableMouseOver() {
if (MouseOver_DisableEnable == "False") {
MouseOver_DisableEnable = "True"
}
else if (MouseOver_DisableEnable == "True") {
MouseOver_DisableEnable = "False"
}
}
function ProductdisableMouseOver() {
if (MouseOver_DisableEnable == "False") {
}
}
function SetSourceWithCommandsNew(src) {
enableContentDocumentHeight = true;
if (MouseOver_DisableEnable == "True") {
if (GetUAgentMainScript() != "") {
src = src.replace("resolution", "250x250");
SetSrc(src);
fullScreenIframeSrc = src;
}
else {
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
_screenWidthChkr = screen.width;
if (_screenWidthChkr >= 1280) {
src = src.replace("resolution", "1280x1024")
SetSrc(src);
fullScreenIframeSrc = src;
}
else if (_screenWidthChkr >= 1024 && _screenWidthChkr < 1280) {
src = src.replace("resolution", "1024x768")
SetSrc(src);
fullScreenIframeSrc = src;
}
else if (_screenWidthChkr >= 800 && _screenWidthChkr < 1024) {
src = src.replace("resolution", "800x600")
SetSrc(src);
fullScreenIframeSrc = src;
}
}
else {
SetSrc(src);
return;
}
}
}
}
function CategorySetSource(src) {
if (MouseOver_DisableEnable == "True") {
if (window.frames["frame_details"] != undefined) {
window.frames["frame_details"].location.replace(src);
}
}
}
function Language_List() {
if (select_lang) {
window.location = select_lang.value;
}
}
function SelectDefaultLanguage() {
if (document.getElementById('select_lang')) {
var _Host = window.location.hostname;
var s = select_lang.options.length;
for (s; s >= 1; s--) {
var Val = select_lang.options[select_lang.options.length - s].value;
var getHost = Val.split("/");
for (var i = 0; i <= getHost.length; i++) {
if (_Host == getHost[i]) {
select_lang.options[select_lang.options.length - s].selected = true;
}
}
}
}
}
function getview() {
}
function RestoregetView() {
}
function EmptyGetview() {
}
function chatroomImageShow() {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "Customer/CustomerChat.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
if (xmlResult != "notLogged In") {
document.getElementById("customerchatting").innerHTML = xmlResult;
}
}
else {
document.getElementById("customerchatting").innerHTML = "";
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
}
function chatroom() {
var req = null;
var splitRslt, userId, userName, chatSiteURL;
req = initXMLHTTPRequest();
if (req) {
req.open("POST", "Customer/CustomerInfo.aspx", true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
splitTslt = xmlResult.split(" ");
userId = splitTslt[0];
userName = splitTslt[1];
}
else {
}
}
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("");
}
findPosY(document.getElementById("catBall"));
findPosX(document.getElementById("catBall"));
document.getElementById("leftbartable").style.display = "none";
document.getElementById("showChatRoom_PHP").style.top = topCategory;
document.getElementById("showChatRoom_PHP").style.left = leftCategory + 5;
document.getElementById("showChatRoom_PHP").style.display = "block";
SetObjectSize("IFChatroom", 220, 314);
SetObjectSize("IFConference", 536, 120);
document.getElementById("sup").style.visibility = "hidden";
document.getElementById("btd").style.display = "none";
document.getElementById("cht").style.display = "none";
document.getElementById("cht_PHP").style.display = "block";
document.getElementById('IFChatroom').src = "http://live." + document.domain + "/chat/chatroom.php?customerNick=" + userName + "&amp;customeruid=" + userId;
}
function globalAjaxHttpObject() {
var xmlRequest;
try {
xmlRequest = new XMLHttpRequest();
return xmlRequest;
}
catch (e) {
try {
xmlRequest = new ActiveXObject("Msxml2.XMLHTTP");
return xmlRequest;
}
catch (e) {
try {
reqVar = new ActiveXObject("Microsoft.XMLHTTP");
return xmlRequest;
}
catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
function ParseXMLResponse(request) {
if (BrowserDetect.browser == "Explorer" && BrowserDetect.version >= 4) {
return request.responseXML.text;
}
else {
parser = new DOMParser();
var xmlDoc = parser.parseFromString(request.responseText, "text/xml");
return xmlDoc.firstChild.textContent;
}
}
function isIE() {
if (navigator.appName == "Microsoft Internet Explorer") {
return true;
} else {
return false;
}
}
function XMLDOMObject(xmlStr) {
try {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(xmlStr);
return xmlDoc;
}
catch (e) {
try {
parser = new DOMParser();
xmlDoc = parser.parseFromString(xmlStr, "text/xml");
return xmlDoc;
}
catch (e) { alert(e.message) }
}
}
function GetWizardControlsAsXMLDocument(xmlContent) {
var parser = new DOMImplementation();
var domDoc = parser.loadXML(xmlContent);
var docRoot = domDoc.getDocumentElement();
return docRoot;
}
function GetBrowserIndendentElementForDocument(_document, _element) {
if (_document.getElementById) {
return _document.getElementById(_element);
}
else if (_document.getElementByName) {
return _document.getElementByName(_element);
}
else if (_document.layers) {
return _document.layers[_element];
}
else if (_document.all) {
return _document.all[_element];
}
}
function GetErrorMessage(ex) {
var ErrorMessage = ex.number + " " + ex.description + "\r\n" + ex.name + " " + ex.message;
return ErrorMessage;
}
var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;
this.versionSearchString = data[i].versionSearch || data[i].identity;
if (dataString) {
if (dataString.indexOf(data[i].subString) != -1)
return data[i].identity;
}
else if (dataProp)
return data[i].identity;
}
},
searchVersion: function (dataString) {
var index = dataString.indexOf(this.versionSearchString);
if (index == -1) return;
return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
},
dataBrowser: [
{ string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
},
{
string: navigator.vendor,
subString: "Apple",
identity: "Safari"
},
{
prop: window.opera,
identity: "Opera"
},
{
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
},
{
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
},
{
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
},
{
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
},
{		// for newer Netscapes (6+)
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
},
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
},
{
string: navigator.userAgent,
subString: "Gecko",
identity: "Mozilla",
versionSearch: "rv"
},
{ 		// for older Netscapes (4-)
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}
],
dataOS: [
{
string: navigator.platform,
subString: "Win",
identity: "Windows"
},
{
string: navigator.platform,
subString: "Mac",
identity: "Mac"
},
{
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}
]
};
BrowserDetect.init();
function SetImgWithResolution(src) {
if (window.frames["frame_details"] != undefined) {
var catURLForFullView = CateFilesWithResoltuion(src)
if (resizeInfiniViewWithResolution == true) {
window.frames["frame_details"].location.replace(catURLForFullView);
}
else {
window.frames["frame_details"].location.replace(src);
}
}
}
function PageBannerLoad_Main(screen, Banner, slot) {
var url = _Domain + "/MP_Ajax/MP_PageBanner.aspx?slot_name=" + slot + "&screen=" + screen + "&banner=" + Banner;
var xmlRequest = DoCallbackNew(url, "")
if (xmlRequest) {
if (Banner == 'Banner_right') {
document.getElementById("Banner_right").style.display = "block";
PageAdRender_Main(xmlRequest.responseText, 'Banner_right')
}
else if (Banner == 'Banner_left') {
document.getElementById("Banner_left").style.display = "block";
PageAdRender_Main(xmlRequest.responseText, 'Banner_left')
}
else if (Banner == 'Banner_bottom') {
document.getElementById("Banner_bottom").style.display = "block";
PageAdRender_Main(xmlRequest.responseText, 'Banner_bottom')
}
}
}
var temp_right1 = new Array();
var temp_left1 = new Array();
var temp_bottom1 = new Array();
function PageAdRender_Main(res, banner) {
var str = res;
if (banner == 'Banner_right') {
temp_right1 = str.split('&&');
PageAd_Main();
var ints1;
ints = setInterval("PageAd_Main();", 10000)
}
else if (banner == 'Banner_left') {
temp_left1 = str.split('&&');
PageAdleft_Main();
var ints2;
ints = setInterval("PageAdleft_Main();", 10000)
}
else if (banner == 'Banner_bottom') {
temp_bottom1 = str.split('&&');
PageAdbottom_Main();
var ints3;
ints = setInterval("PageAdbottom_Main();", 10000)
}
}
var imp_count = 0
function PageAd_Main() {
if (isFull == true) {
removeElementById('Banner_right');
}
else {
if (temp_right1[imp_count] != null) {
if (temp_right1[imp_count] != '') {
document.getElementById("Banner_right").style.display = "block";
document.getElementById("Banner_right").innerHTML = temp_right1[imp_count];
imp_count = imp_count + 1;
}
else {
imp_count = 0
}
}
else {
document.getElementById("Banner_right").style.display = "block";
imp_count = 0
}
}
}
var imp_count1 = 0
function PageAdleft_Main() {
if (isFull == true) {
removeElementById('Banner_left');
}
else {
if (temp_left1[imp_count1] != null) {
if (temp_left1[imp_count1] != '') {
document.getElementById("Banner_left").style.display = "block";
document.getElementById("Banner_left").innerHTML = temp_left1[imp_count1];
imp_count1 = imp_count1 + 1;
}
else {
imp_count1 = 0
}
}
else {
document.getElementById("Banner_left").style.display = "block";
imp_count1 = 0
}
}
}
var imp_count2 = 0
function PageAdbottom_Main() {
if (isFull == true) {
removeElementById('Banner_bottom');
}
else {
if (temp_bottom1[imp_count2] != null) {
if (temp_bottom1[imp_count2] != '') {
document.getElementById("Banner_bottom").style.display = "block";
document.getElementById("Banner_bottom").innerHTML = temp_bottom1[imp_count2];
imp_count2 = imp_count2 + 1;
}
else {
imp_count2 = 0
}
}
else {
document.getElementById("Banner_bottom").style.display = "block";
imp_count2 = 0
}
}
}
function ShowcaseShow() {
SetSource('../AJAX/ProductShowcase.aspx');
downslideNew();
hideAllRight();
}
function PreviewCheck() {
if (PreviewControl == false) {
PreviewControl = true;
img_preview.setAttribute("alt", "Preview ON");
document.getElementById('img_preview').src = '../images/PreviewHover.jpg';
}
else if (PreviewControl == true) {
PreviewControl = false;
img_preview.setAttribute("alt", "Preview OFF");
document.getElementById('img_preview').src = '../images/PreviewSimple.jpg';
}
}
function PreviewShow(Src, func) {
var ImagePreviewSet = 'false';
var USettings = ReadCookie("usersettings");
if (USettings != '') {
var vars = USettings.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0].toLowerCase() == "productimagepreview") {
ImagePreviewSet = pair[1];
}
}
}
if (ImagePreviewSet.toLowerCase() == 'true' || catComView.toLowerCase() == "topper") {
if (func.toLowerCase() == 'sw') {
SetSourceWithCommands(Src);
}
else if (func.toLowerCase() == 'ss') {
SetSource(Src);
}
}
}
function RelatedPreviewShow(src) {
var RelatedPreviewSet = 'true';
if (RelatedPreviewSet.toLowerCase() == 'true') {
var screen_height = screen.height;
var screen_width = screen.width;
var IFrame = document.getElementById("iframeRelatedProShow");
src = _Domain + src;
if ((screen_width <= 1023) || (screen_height <= 767)) {
IFrame.width = "545px"
IFrame.height = "230px"
}
else if ((screen_width <= 1279) || (screen_height <= 1023)) {
if (resizeInfiniViewWithResolution == false) {
IFrame.width = "545px";
IFrame.height = "229px";
}
else {
IFrame.width = "768px"
IFrame.height = "229px";
}
}
else if ((screen_width >= 1280) || (screen_height >= 1024)) {
if (resizeInfiniViewWithResolution == false) {
IFrame.width = "545px";
IFrame.height = "229px"
} else {
IFrame.width = "960px";
IFrame.height = "477px";
}
}
if (USE_FILESYSTEM_PROUDCTCOMMANDS) {
_screenWidthChkr = screen_width;
if (_screenWidthChkr >= 1280) {
src = src.replace("resolution", "1280x1024")
parent.window.frames["iframeRelatedProShow"].location.replace(src);
}
else if (_screenWidthChkr >= 1024 && _screenWidthChkr < 1280) {
src = src.replace("resolution", "1024x768")
parent.window.frames["iframeRelatedProShow"].location.replace(src);
}
else if (_screenWidthChkr >= 800 && _screenWidthChkr < 1024) {
src = src.replace("resolution", "800x600")
parent.window.frames["iframeRelatedProShow"].location.replace(src);
}
}
else {
window.frames["iframeRelatedProShow"].location.replace(src);
}
findPosY(document.getElementById("IFRAME_Table"));
findPosX(document.getElementById("IFRAME_Table"));
document.getElementById("RelatedProShow").style.top = topCategory;
document.getElementById("RelatedProShow").style.left = leftCategory + 75;
document.getElementById('RelatedProShow').style.width = IFrame.width;
document.getElementById('RelatedProShow').style.height = IFrame.height;
document.getElementById('RelatedProShow').style.display = "block";
document.getElementById('RelatedPreviewBg').style.display = "block";
document.getElementById('lang_list').style.display = "none";
document.getElementById("Banner_left").style.visibility = 'hidden';
document.getElementById("Banner_bottom").style.visibility = 'hidden';
document.getElementById("Banner_right").style.visibility = 'hidden';
}
}
function CloseRelatedPreview() {
document.getElementById('lang_list').style.display = "block";
document.getElementById('RelatedProShow').style.display = "none";
document.getElementById('RelatedPreviewBg').style.display = "none";
}
function rowProbkgdOverInText(CatRow) {
document.getElementById(CatRow).className = onMouseOverCatbkgd;
}
function rowProbkgdOutinText(CatRow) {
document.getElementById(CatRow).className = onMouseOutCatbkgd;
}
function BuyerButtonRedirect() {
var src = "http://" + window.location.host + "/Customer/home.aspx";
SetSourceNew(src)
}
function cartProcessWait(ChkString) {
try {
document.getElementById("ProcessChecout").style.display = 'block';
document.getElementById("paymentProcess").style.display = 'none';
if (ChkString == "ACheckout") {
parent.window.ProcessCartCommandNew('ACheckout');
}
if (ChkString == "ABCheckout") {
parent.window.ProcessCartCommandNew('ABCheckout');
}
else if (ChkString == "GCheckout") {
parent.window.ProcessCartCommandNew('GCheckout');
}
else if (ChkString == "WPCheckout") {
parent.window.ProcessCartCommandNew('WPCheckout');
}
else if (ChkString == "PECheckout") {
parent.window.ProcessCartCommandNew('PECheckout');
}
else if (ChkString == "PCheckout") {
parent.window.ProcessCartCommandNew('PCheckout');
}
else if (ChkString == "CODCheckout") {
parent.window.ProcessCartCommandNew('CODCheckout');
}
}
catch (e) {
alert(e);
Checkout();
}
}
function defaultPageBannerhome_init() {
var screen_height = screen.height;
var screen_width = screen.width;
var IFrame = document.getElementById("IO_Office_Container");
var MainTable = document.getElementById("Page_Table");
if ((screen_width <= 1023) || (screen_height <= 767)) {
IFrame.width = "100%"
IFrame.height = "220"
}
else if ((screen_width <= 1279) || (screen_height <= 1023)) {
if (resizeInfiniViewWithResolution == false) {
IFrame.width = "780";
IFrame.height = "370";
} else {
MainTable.width = fullPageWidth // Returns "972.8" on Resoluation 1024x768;
IFrame.width = "100%";
IFrame.height = "360";
IFrame.align = "left";
}
document.getElementById("ag").style.verticalAlign = "middle";
}
else if ((screen_width >= 1280) || (screen_height >= 1024)) {
if (resizeInfiniViewWithResolution == false) {
IFrame.width = "780";
IFrame.height = 370;
} else {
IFrame.width = "100%";
IFrame.height = "100%";
IFrame.align = "left";
}
document.getElementById("ag").style.verticalAlign = "Top";
}
document.getElementById("Banner_right").innerHTML = loadPagesImage;
document.getElementById("Banner_left").innerHTML = loadPagesImage;
document.getElementById("Banner_bottom").innerHTML = loadPagesImage;
setTimeout("defaultPageBannerVisibleNew()", 2000);
}
function relatedProductPreview(rp_id) {
ProductSlideShow_Init(rp_id);
}
function LoadCommands_WorkflowProduct(productID, productCODE, sortNo, mandatory) {
var SubProductCount = _WorkflowProduct.GetWorkflowProductCount(productID, productCODE);
if (parseInt(SubProductCount) > 0) {
WORKFLOW_PARENT_PRODUCT[WORKFLOW_PARENT_PRODUCT.length] = productID;
WORKFLOW_PRODUCT_CURRENT = productID;
var seqUrl;
seqUrl = PAGE_WORKFLOWPRODUCT + "?product_id=" + productID;
SetSource(seqUrl);
}
else {
ShowHideProductCommands('Product', productID, '?product_id=' + productID, null, 'search');
}
}
function GetContentAsXMLDocument(xmlContent) {
var parser = new DOMImplementation();
var domDoc = parser.loadXML(xmlContent);
var docRoot = domDoc.getDocumentElement();
return docRoot;
}
function Workflow_SkipProduct(ProductID) {
_WorkflowProduct._NavigationCommands._MoveNext();
}
function Workflow_ClearContainer() {
var Container_Workflow = document.getElementById("Container_Workflow");
if (Container_Workflow != null) {
Container_Workflow.innerHTML = "";
Container_Workflow.style.display = "none";
}
}
function Workflow_LoadNextProduct() {
if (_CurrentWorkflowProduct != null) {
if (_CurrentWorkflowProduct._Workflow != null) {
if (_CurrentWorkflowProduct._CurrentProduct != null) {
if (_CurrentWorkflowProduct._CurrentProduct._RedirectToCart == true) {
Workflow_ClearContainer();
_WorkflowProduct = null;
_NavigationCommands = null;
_CurrentWorkflowProduct = null;
SetSource(PAGE_SHOPPINGCART + "?LoadCommands=0");
return;
}
if (_CurrentWorkflowProduct._CurrentProduct._SortNo == _CurrentWorkflowProduct._Workflow._SubProducts.length) {
if (_CurrentWorkflowProduct._ProductID == _WorkflowProduct._ProductID) {
Workflow_ClearContainer();
_WorkflowProduct = null;
_NavigationCommands = null;
_CurrentWorkflowProduct = null;
SetSource(PAGE_SHOPPINGCART + "?LoadCommands=0");
}
else {
var ProductID = _CurrentWorkflowProduct._ParentProductID;
var ParentID = _CurrentWorkflowProduct._ParentProductID;
var ParentCode = _CurrentWorkflowProduct._ParentProductCode;
var SortNo = _CurrentWorkflowProduct._SortNo;
var temp = PAGE_WORKFLOWPRODUCT + "?product_id=" + ProductID + "&ParentID=" + ParentID + "&ParentCode=" + ParentCode + "&SortNo=" + SortNo;
SetSource(temp);
}
}
else if (_CurrentWorkflowProduct._CurrentProduct._SortNo < _CurrentWorkflowProduct._Workflow._SubProducts.length) {
var tempProduct = null;
tempProduct = _CurrentWorkflowProduct._Workflow._SubProducts[_CurrentWorkflowProduct._CurrentProduct._SortNo];
if (tempProduct == null) {
var ProductID = _CurrentWorkflowProduct._ParentProductID;
var ParentID = _CurrentWorkflowProduct._ParentProductID;
var ParentCode = _CurrentWorkflowProduct._ParentProductCode;
var SortNo = _CurrentWorkflowProduct._SortNo;
var temp = PAGE_WORKFLOWPRODUCT + "?product_id=" + ProductID + "&ParentID=" + ParentID + "&ParentCode=" + ParentCode + "&SortNo=" + SortNo;
SetSource(temp);
return;
}
else {
_CurrentWorkflowProduct._CurrentProduct.ChangeTo_Purchased();
_CurrentWorkflowProduct._CurrentProduct = tempProduct;
_CurrentWorkflowProduct._CurrentProduct.LoadCommands();
}
}
}
else {
Workflow_ClearContainer();
_WorkflowProduct = null;
_NavigationCommands = null;
_CurrentWorkflowProduct = null;
SetSource(PAGE_SHOPPINGCART + "?LoadCommands=0");
}
}
}
}
function buyerTable() {
if (window.parent.frames.frame_details.buyerview != undefined) {
window.parent.frames.frame_details.buyerview.style.display = "block";
window.parent.frames.frame_details.loadingBuyer.style.display = "none";
}
else {
}
}
function seqProduct(pro_id) {
WORKFLOW_PARENT_PRODUCT[0] = pro_id.toString();
_WorkflowProduct = null;
_NavigationCommands = new NavigationCommands();
_CurrentWorkflowProduct = null;
var seqUrl;
seqUrl = PAGE_WORKFLOWPRODUCT + "?product_id=" + pro_id;
SetSource(seqUrl);
}
function buyerProcess(ProductIDBuyer) {
var seqUrl;
seqUrl = "AJAX/BuyerProProcess.aspx?product_id=" + ProductID;
SetSource(seqUrl);
}
function pBuyer(ProductIDBuyer) {
var seqUrl;
window.parent.frames.frame_details.buyerview.style.display = "none";
seqUrl = "BuyerProProcess.aspx?product_id=" + ProductIDBuyer;
SetSource(seqUrl);
}
function redirecttoProduct(ProIDBuyer) {
var seqUrl;
res = screen.width + "x" + screen.height;
seqUrl = "BuyerBuyProduct.aspx?product_id=" + ProIDBuyer + "&set=" + res;
SetSource(seqUrl);
}
function proMainRedirect(proID) {
urlName = document.domain;
var imgLoc = "http://" + urlName + '/default.aspx?ProURL_ID=' + proID;
this.parent.location.href = imgLoc;
}
function CheckWorkflowQueryString() {
var Workflow = queryString("Workflow");
var Order = queryString("Order");
var Code = queryString("Code");
var Display = queryString("Display");
if (Workflow != "false" && Order != "false" && Code != "false" && Display != "false") {
if (parent.RedirectedToWorkflowOrder == null) {
RedirectedToWorkflowOrder = true;
var url = PAGE_WORKFLOWORDER + "?Workflow=" + Workflow + "&Order=" + Order + "&Code=" + Code + "&Display=" + Display
SetSource(url);
return true;
}
}
else {
return false;
}
}
function hideWorkFlow() {
document.getElementById("Container_Workflow").style.display = "none";
_WorkflowProduct = null;
_CurrentWorkflowProduct = null;
_NavigationCommands = null;
WORKFLOW_PRODUCT = null
WORKFLOW_PRODUCT_MANDATORY = null
}
function ProcessCommand_ReadyMadeCompany_InfiniShops(arg) {
if (arg == "Check") {
parent.ShowHideProductCommands('Product', parent.CurrentProductID, '?product_id=' + parent.CurrentProductID, null, 'search');
parent.document.getElementById("RelatedProductDiv").style.display = 'none';
return;
}
if (arg == "Buy") {
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
return;
}
}
function LoadCommands_ReadyMadeCompany_InfiniShops(arg) {
var xmlRequest;
if (arg != null) {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeCompany_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&WithProceed=true");
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeCompany_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice + "&WithProceed=true");
}
}
else {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeCompany_InfiniShops.aspx", "?product_id=" + CurrentProductID);
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeCompany_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice);
}
}
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
function GetPageName() {
var sPath = window.location.pathname;
return sPath;
}
function CheckMultiReg() {
var domain = 'http://' + window.location.host;
var query_new = window.location.search.substring(1);
var vars = query_new.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0].toLowerCase() == "redirectto") {
domain = '/customer/CheckAllowMultiReg.aspx?RedirectTo=' + pair[1];
}
else {
domain = '/customer/CheckAllowMultiReg.aspx';
}
}
parent.SetSrc(domain);
}
function MultiReg(ClickType) {
var domain = 'http://' + window.location.host;
if (ClickType.toLowerCase() == 'simple') {
domain = domain + '/customer/Register.aspx';
}
else if (ClickType.toLowerCase() == 'verified') {
domain = domain + '/customer/Register.aspx?type=verified&RedirectTo=/Shopping/Checkout.aspx';
}
else if (ClickType.toLowerCase() == 'upgrade') {
domain = domain + '/customer/Sign_In_Upgrade.aspx?type=upgrade&RedirectTo=/Shopping/Checkout.aspx'
}
window.location = domain;
}
function productCatLedder(proId) {
document.getElementById("stackText").innerHTML = loadPagesImage;
var xmlRequest = DoCallback("../Catalog/ProductCatLadder.aspx?ProductId=" + proId, "");
xmlRes = xmlRequest.responseText;
document.getElementById("stackText").innerHTML = xmlRes;
stop();
}
function CategoryLedder(CatId) {
document.getElementById("stackText").innerHTML = loadPagesImage;
var xmlRequest = DoCallback("../Catalog/CatLeader.aspx?categoryID=" + CatId, "");
xmlRes = xmlRequest.responseText;
document.getElementById("stackText").innerHTML = xmlRes;
stop();
}
function ProcessCommand_ReadyMadeDomain_InfiniShops(arg) {
if (arg == "Check") {
parent.ShowHideProductCommands('Product', parent.CurrentProductID, '?product_id=' + parent.CurrentProductID, null, 'search');
parent.document.getElementById("RelatedProductDiv").style.display = 'none';
return;
}
if (arg == "Buy") {
window.top.frames["frame_details"].SetArgument(arg);
window.top.frames["frame_details"].Submit();
return;
}
}
function LoadCommands_ReadyMadeDomain_InfiniShops(arg) {
var xmlRequest;
if (arg != null) {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeDomain_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&WithProceed=true");
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeDomain_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice + "&WithProceed=true");
}
}
else {
if (CurrentProductPrice == "0.00") {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeDomain_InfiniShops.aspx", "?product_id=" + CurrentProductID);
}
else {
xmlRequest = DoCallback(_Domain + "/AJAX/Commands_ReadyMadeDomain_InfiniShops.aspx", "?product_id=" + CurrentProductID + "&price=" + CurrentProductPrice);
}
}
document.getElementById("ACTIVECOMMANDS").innerHTML = xmlRequest.responseText;
document.getElementById("ACTIVECOMMANDS").style.visibility = 'visible';
}
function ReadyMadeCompany_ShowBuyButton(sender) {
try {
document.getElementById('img_buy').style.visibility = 'visible';
}
catch (e) {
alert(e.message);
}
}
function ReadyMadeDomain_ShowBuyButton(sender) {
try {
document.getElementById('img_buy').style.visibility = 'visible';
}
catch (e) {
alert(e.message);
}
}
function ProcessCartCommandNew(arg) {
if (window["frame_details"]) {
if (arg == 'PECheckout') {
var a = document.createElement('div');
a.setAttribute('width', 546);
a.setAttribute('height', 314);
a.setAttribute('text-align', 'center');
a.setAttribute('line-height', '200px');
a.innerHTML = '<table width=546 height=320 ><tr valign =middle ><td align =center  class="text4" >Please Wait ... </td></tr></table>';
var node = document.getElementById("frame_details");
node.setAttribute('height', 0); //line added on 22062011
node.parentNode.insertBefore(a, node);
}
window["frame_details"].SetArgument(arg);
window["frame_details"].Submit();
}
else {
window["frame_details"].SetArgument(arg);
window["frame_details"].Submit();
}
if (arg == "get_equote") {
UnLoadCommands();
}
if (arg == "checkout") {
Workflow_ClearContainer();
UnLoadCommands();
}
if (arg == "continue_shop") {
UnLoadCommands();
}
if (arg == "google_checkout") {
UnLoadCartCommands();
}
}
function CheckDomainExistence(DomainName) {
var url = "http://" + window.location.host + "/Utility.asmx";
_Common = new Common();
var request = _Common.RemoteCallWebService(url, "business4less.com", "CheckDomainExistence", "<DomainName>" + DomainName.toString() + "</DomainName>");
try {
if (request) {
var sr = _Common.GetSOAPMethodCall("business4less.com", "CheckDomainExistence", "<DomainName>" + DomainName.toString() + "</DomainName>");
request.send(sr);
if (request.readyState == 4) {
var result = ParseXMLResponse(request);
if (result == "FALSE") {
return false;
}
if (result == "TRUE") {
return true;
}
if (result == "UNDEFINED") {
return false;
}
}
}
}
catch (exp) {
window.alert(exp.toString());
}
}
function iPhoneInifiniView(iViewVisibility, mainCategoryVisibility) {
var elems = ["FavouriteProductDiv", "HistoryProductDiv"]
for (var i = 0; i < elems.length; i++) {
if (document.getElementById(elems[i]) != null) {
document.getElementById(elems[i]).style.display = "none";
}
}
var infiniViewTable = document.getElementById("IFrameTD");
var infiniViewFrame = document.getElementById("frame_details");
var mainCategories = document.getElementById("leftbartable");
document.getElementById("catBall").style.display = mainCategoryVisibility;
document.getElementById("actCmd_Container").style.display = iViewVisibility;
mainCategories.style.display = mainCategoryVisibility;
infiniViewTable.style.display = iViewVisibility;
infiniViewFrame.style.display = iViewVisibility;
}
var isIPhone = GetUAgentMainScript();
function isIPhoneBrowser() {
if (navigator.userAgent.indexOf('iPhone') != -1) {
return true;
}
else {
return false;
}
}
function getDynamicTransform(funcName, dw, dh) {
var sizeOf = new Array();
switch (funcName) {
case "slidebox":
if (GetUAgentMainScript() != "") {
sizeOf["width"] = "100%";
sizeOf["height"] = "302";
}
else {
sizeOf["width"] = "220";
sizeOf["height"] = "302";
}
return sizeOf;
break;
case "SetObjectSize":
if (GetUAgentMainScript() != "") {
sizeOf["width"] = "100%";
sizeOf["height"] = "302";
}
else {
sizeOf["width"] = dw;
sizeOf["height"] = dh;
}
return sizeOf;
break;
case "CatLoadCaller":
if (GetUAgentMainScript() != "") {
sizeOf["width"] = (document.body.clientWidth * .9); //"100%";
sizeOf["height"] = "100%";
}
else {
sizeOf["width"] = dw;
sizeOf["height"] = dh;
}
return sizeOf;
break;
}
}
function getDynamicPositions(funcName, dpX, dpY) {
var posOf = new Array();
switch (funcName) {
case "hisProductRender":
if (GetUAgentMainScript() != "") {
posOf["x"] = 0;
posOf["y"] = 30;
}
else {
if (catComView.toLowerCase() == "topper") {
posOf["x"] = findPosX(document.getElementById("catBallNew"));
posOf["y"] = findPosY(document.getElementById("catBallNew"));
}
else {
posOf["x"] = findPosX(document.getElementById("catBall"));
posOf["y"] = findPosY(document.getElementById("catBall"));
}
}
return posOf;
break;
case "myMainCategoryMoving":
if (GetUAgentMainScript() != "") {
posOf["x"] = "";
posOf["y"] = 60;
}
else {
posOf["x"] = dpX;
posOf["y"] = dpY;
}
return posOf;
break;
case "RelatedProductDiv":
if (GetUAgentMainScript() != "") {
posOf["x"] = 0;
posOf["y"] = 30;
}
else {
if (catComView.toLowerCase() == "topper") {
posOf["x"] = findPosX(document.getElementById("catBallNew"));
posOf["y"] = findPosY(document.getElementById("catBallNew"));
}
else {
posOf["x"] = findPosX(document.getElementById("catBall"));
posOf["y"] = findPosY(document.getElementById("catBall"));
}
}
return posOf;
break;
}
}
function iphoneOpenClosePannel(imgID, newSrc, reverseSrc, Elem) {
imgObj = document.getElementById(imgID);
obj = document.getElementById(Elem);
if (obj.style.display != "block") {
imgObj.src = newSrc;
obj.style.display = "block";
}
else {
imgObj.src = reverseSrc;
obj.style.display = "none";
}
}
function getIPhoneIViewFor(funcName) {
switch (funcName) {
case "SetSourceWithCommands": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "ShowHideProductCommands": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "refresh": if (GetUAgentMainScript() != "") { iPhoneInifiniView("none", "block"); } break;
case "LoadProductImageFiles": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "loadChildLevels": if (GetUAgentMainScript() != "") { iPhoneInifiniView("none", "block"); } break;
case "myaccount": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "stackCat": if (GetUAgentMainScript() != "") { iPhoneInifiniView("none", "block"); } break;
case "SetSourceNewWithCommands": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "SetSourceNew": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
case "CalculateAmount_WizardProduct": if (GetUAgentMainScript() != "") { iPhoneInifiniView("block", "none"); } break;
}
}
function switchStringForIPhone(css, wapCss) {
if (GetUAgentMainScript() != "") {
return wapCss;
}
else {
return css;
}
}
function switchRedirection(URL, wapURL) {
if (GetUAgentMainScript() != "") {
parent.location = wapURL;
}
else {
parent.location = URL;
}
}
function __initIPHONE() {
if (document.getElementById("RelatedProductDiv")) {
document.getElementById("RelatedProductDiv").style.top = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 10))["y"]; //topCategory + 10;
document.getElementById("RelatedProductDiv").style.left = getDynamicPositions("RelatedProductDiv", (topCategory + 10), (topCategory + 5))["x"] //leftCategory + 5;
}
}
function CheckReferrerDomain(DomainName) {
var url = "http://" + window.location.host + "/Utility.asmx";
_Common = new Common();
var request = _Common.RemoteCallWebService(url, "business4less.com", "CheckReferrerDomain", "<DomainName>" + DomainName.toString() + "</DomainName>");
try {
if (request) {
var sr = _Common.GetSOAPMethodCall("business4less.com", "CheckReferrerDomain", "<DomainName>" + DomainName.toString() + "</DomainName>");
request.send(sr);
if (request.readyState == 4) {
var result = ParseXMLResponse(request);
result = result.toUpperCase();
if (result == "FALSE") {
return false;
}
if (result == "TRUE") {
return true;
}
}
}
}
catch (exp) {
window.alert(exp.toString());
}
}
function CheckUKCompanyName(CompanyName) {
var url = "http://" + window.location.host + "/Utility.asmx";
_Common = new Common();
var request = _Common.RemoteCallWebService(url, "business4less.com", "CheckCompanyExistence", "<CompanyName>" + CompanyName.toString() + "</CompanyName>");
try {
if (request) {
var sr = _Common.GetSOAPMethodCall("business4less.com", "CheckCompanyExistence", "<CompanyName>" + CompanyName.toString() + "</CompanyName>");
request.send(sr);
if (request.readyState == 4) {
var result = ParseXMLResponse(request);
return result;
}
}
}
catch (exp) {
window.alert(exp.toString());
}
}
function CheckOffshoreCompanyName(CompanyName, CompanyType, ProudctID) {
var url = "http://" + window.location.host + "/Utility.asmx";
_Common = new Common();
var request = _Common.RemoteCallWebService(url, "business4less.com", "CheckOffshoreCompanyExistence", "<CompanyName>" + CompanyName.toString() + "</CompanyName>" + "<CompanyType>" + CompanyType.toString() + "</CompanyType>" + "<ProudctID>" + ProudctID.toString() + "</ProudctID>");
try {
if (request) {
var sr = _Common.GetSOAPMethodCall("business4less.com", "CheckOffshoreCompanyExistence", "<CompanyName>" + CompanyName.toString() + "</CompanyName>" + "<CompanyType>" + CompanyType.toString() + "</CompanyType>" + "<ProudctID>" + ProudctID.toString() + "</ProudctID>");
request.send(sr);
if (request.readyState == 4) {
var result = ParseXMLResponse(request);
return result;
}
}
}
catch (exp) {
window.alert(exp.toString());
}
}
function iphoneSliderMenu_nextSlide(id, type, params, _URL, level) {
var UAgent = GetUAgentMainScript();
switch (level) {
case "1":
LoadChildren1_wap(type, params, _URL);
break;
case "2":
ShowHideInnerLayoutNew_wap(params, _URL);
}
}
function iphoneSliderMenu_prevSlide(id, type, params, _URL, level) {
switch (level) {
case "1":
LoadChildren1_wap(type, params, _URL);
break;
case "2":
ShowHideInnerLayoutNew_wap(params, _URL);
break;
case "root":
break;
}
}
function LoadChildren1_wap(type, params, _URL) {
if (GetUAgentMainScript() != "") {
xType = type;
xParams = params;
x_Url = _URL;
document.getElementById('DIV_LIST').style.display = 'block';
document.getElementById('DIV_LIST').innerHTML = loadPagesImage;
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").innerHTML = redirectURL;
window.location.href = _URL;
}
else if (_URL == "javascript:") {
document.getElementById("DIV_LIST").style.display = 'block';
sldbox = 2;
var xmlResult;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/NewProPageDis.aspx" + params + "&relatedpro=" + RelatedViewChkr + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById('DIV_LIST').innerHTML = "";
document.getElementById('DIV_LIST').innerHTML = xmlResult;
if (GetUAgentMainScript() == "msie") {
var the_height = document.body.clientHeight;
document.getElementById('leftbartable').style.height = the_height;
document.getElementById('DIV_LIST').style.height = "100%";
}
if (navigator.userAgent.indexOf('MSIEMobile') == -1) {
}
secCatRes = xmlResult;
simpleTopVar = "showPro";
var firstProduct;
var i = params.indexOf('y')
i = i + 2
var d = params.indexOf('&', i);
var curr = d - i;
firstProduct = params.substr(i, curr);
var _fileURL;
catloadChecker = "Done";
}
else {
}
}
req.send("");
}
}
}
}
function ShowHideInnerLayoutNew_wap(params, _URL) {
if (GetUAgentMainScript() != "") {
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").style.display = 'block';
document.getElementById("DIV_LIST").innerHTML = redirectURL;
window.location.href = _URL;
}
else if (_URL == "javascript:") {
document.getElementById("DIV_LIST").style.display = 'block';
sldbox = 2;
var xmlResult;
document.getElementById("DIV_LIST").innerHTML = loadPagesImage;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/New_PreInner_CatPro.aspx" + params + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById("DIV_LIST").innerHTML = "";
document.getElementById("DIV_LIST").innerHTML = xmlResult;
simpleTopVar = "showPro";
var firstProduct;
var i = params.indexOf('y')
i = i + 2
var d = params.indexOf('&', i);
var curr = d - i;
firstProduct = params.substr(i, curr);
var _fileURL;
if (resizeInfiniViewWithResolution == true) {
_fileURL = "http://" +
window.location.host + '/cat_files/' + firstProduct + '/cat_img/resolution/index.htm';
SetSourceWithCommands(_fileURL);
currentCenterImage = _fileURL;
}
else {
_fileURL = "http://" + window.location.host + '/cat_files/' + firstProduct + '/cat_img/index.htm';
currentCenterImage = _fileURL;
}
catloadChecker = "Done";
}
else {
document.getElementById("DIV_LIST").innerHTML = loadPagesImage;
SetSource("/loadingpage.html");
}
}
}
req.send("");
}
}
}
function stackCatRander_wap(StactText) {
stactCatTemp_wap += "_" + StactText;
stackCatLimit_wap(3, stactCatTemp_wap);
}
function stackCatLimit_wap(limit, str) {
var splitStactCatTemp_wap = str.split("_");
if (splitStactCatTemp_wap.length > limit) {
var stackCatLimits = (splitStactCatTemp_wap.length - limit);
for (i = stackCatLimits; i < splitStactCatTemp_wap.length; i++) {
}
}
}
var k = 0;
var nData = ""
var tbl = "";
function stackCategories_wap(str, sapr, c) {
if (GetUAgentMainScript() != '') {
iPhonePathCat = str.split(sapr);
var n = iPhonePathCat.length - 1;
if (k < n) {
k++;
if (iPhonePathCat[k].length > 20) {
var txt = document.getElementById("stackText").innerText;
var splitTxt = txt.split(">>")
for (j = 0; j < splitTxt.length - 1; j++) {
nData += "<td><a href='#' class='StackCategories_wap' onClick='alert('ss')' > >> " + splitTxt[j].substr(0, 16).concat("..."); +"</a></td>";
}
}
tbl = "<table><tr><td><img src='../images/cat_img/new/menu_arrow.gif' onClick='alert('sss');' /></td>" + nData + "</tr></table>";
}
if (n > c) {
var data = "";
var tbl = "";
var j = n - c;
for (i = j; i < n; i++) {
data += "<td  ><a href='#' class='StackCategories_wap' onClick='alert('f')' > >> " + iPhonePathCat[i].substr(0, 14).concat("..."); +"</a></td>";
}
tbl = "<table><tr><td><img src='../images/cat_img/new/menu_arrow.gif'  onClick='iphoneSliderMenu_prevSlide('list','','','','root')' /></td>" + data + "</tr></table>";
}
}
}
function GO_UP() {
if (document.getElementById('InfiniOffice1_InfiniOffice')) {
document.getElementById('InfiniOffice1_InfiniOffice').contentWindow.document.getElementById('IFControl').contentWindow.Back();
return;
}
back();
return;
if (GetUAgentMainScript() != "") {
relatedProductBarHide();
stackcall();
UnLoadCommands();
}
else {
relatedProductBarHide();
document.getElementById("leftbartable").style.visibility = 'visible';
if (arguments.length > 0) {
level = arguments[0];
}
switch (level) {
case "Home":
nullAllVar();
activeLevelzero();
refresh();
break;
case 1:
nullAllVar();
activeLevelzero();
parentStacking(StackCateCache);
if (GetUAgentMainScript() == "") {
LoadChildren1(xType, xParams, x_Url);
DisplayProductsInfiniMenu(GetValueFromString(xParams, "category"));
}
else {
LoadChildren1_wap(xType, xParams, x_Url);
}
break;
case 2:
nullAllVar();
activeLevelzero();
stackCat(stackParms[0]);
if (GetUAgentMainScript() == "") {
ShowHideInnerLayoutNew(x2Params, x2_Url);
DisplayProductsInfiniMenu(GetValueFromString(x2Params, "category"));
}
else {
ShowHideInnerLayoutNew_wap(x2Params, x2_Url);
}
stackLevel = 1;
break;
case 3:
nullAllVar();
activeLevelzero();
stackCat(stackParms[1]);
if (GetUAgentMainScript() == "") {
ShowHideInnerLayoutNew(x2Params, x2_Url);
DisplayProductsInfiniMenu(GetValueFromString(x2Params, "category"));
}
else {
ShowHideInnerLayoutNew_wap(x2Params, x2_Url);
}
stackLevel = 2;
break;
case "MainPro":
nullAllVar();
activeLevelzero();
parentStacking(StackCateCache);
LoadChildren1_wap(xType, xParams, x_Url);
break;
case "SubPro":
stackCat(stackParms[0]);
if (GetUAgentMainScript() == "") {
ShowHideInnerLayoutNew(x2Params, x2_Url);
}
else {
ShowHideInnerLayoutNew_wap(x2Params, x2_Url);
document.getElementById("leftbartable").style.visibility = 'visible';
document.getElementById("DIV_LIST").style.display = 'block';
}
stackLevel = 1;
break;
default:
level = 1;
break;
}
}
}
var StackSlider = {
x: 0,
w: 0,
nx: 0,
Back: function (divID) {
if (document.getElementById(divID).style.left == "") { this.x = 0; }
else { this.x = parseInt(document.getElementById(divID).style.left); }
if (document.getElementById("stackText").offsetWidth > w) {
var bx = document.getElementById("stackText").offsetWidth - w;
nx = -bx;
t1 = new Tween(document.getElementById(divID).style, 'left', Tween.backEaseIn, this.x, -bx, .5, 'px')
t1.start()
}
},
Next: function (divID) {
var x = parseInt(document.getElementById(divID).style.left);
if (x < 0) {
t1 = new Tween(document.getElementById(divID).style, 'left', Tween.backEaseIn, x, 0, .5, 'px')
t1.start();
}
},
ShowNavigation: function () {
if (document.getElementById("stack_next") && document.getElementById("stack_back")) {
document.getElementById("stack_next").style.display = "block";
document.getElementById("stack_back").style.display = "block";
}
},
LiquidWidth: function () {
w = Math.round(document.body.offsetWidth * .87); // document.getElementById("stcTd").clientWidth;
},
Init: function () {
}
}
StackSlider.Init();
var e = "";
var c = "";
var cp = "";
var t = "";
if (GetUAgentMainScript() != "") {
var clr = "ffffff"
}
else {
var clr = "f3f3f3"
}
function setID_RegForm_Wap(id, fld) {
switch (fld.toUpperCase()) {
case "EMAIL": e = id; break;
case "TELEPHONE": t = id; break;
case "PASS": p = id; break;
case "CPASS": cp = id; break;
}
}
function regFormBlur_wap(id, num) {
var fld = document.getElementById(id);
var img = document.getElementsByName("rAlert")[num];
if (fld.value == "") {
fld.style.background = clr
img.src = "../wap_images/err.gif";
}
else {
switch (id) {
case e:
if (fld.value.indexOf("@") != -1 && document.getElementById(id).value.indexOf(".") != -1) {
fld.style.background = "ffffff"
img.src = "../wap_images/currect.gif";
}
else {
fld.style.background = clr;
img.src = "../wap_images/err.gif";
}
break;
case cp:
if (fld.value != "" && document.getElementById(id).value == document.getElementById(p).value) {
fld.style.background = "ffffff"
img.src = "../wap_images/currect.gif";
}
else {
fld.style.background = clr
img.src = "../wap_images/err.gif";
}
break;
case t:
if (isInteger(document.getElementById(id).value)) {
fld.style.background = "ffffff"
img.src = "../wap_images/currect.gif";
}
else {
fld.style.background = clr
img.src = "../wap_images/err.gif";
}
break;
default:
fld.style.background = "ffffff"
img.src = "../wap_images/currect.gif";
break;
}
}
}
function isInteger(s) {
var i;
for (i = 0; i < s.length; i++) {
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
}
return true;
}
function LoadChildren1_WinCE(type, params, _URL) {
xType = type;
xParams = params;
x_Url = _URL;
document.getElementById('DIV_LIST').style.display = 'block';
if ((_URL != "") && (_URL != "javascript:")) {
document.getElementById("DIV_LIST").innerHTML = redirectURL;
window.location = _URL;
}
else if (_URL == "javascript:") {
sldbox = 2;
var xmlResult;
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "Catalog/NewProPageDis.aspx" + params + "&relatedpro=" + RelatedViewChkr + uAgent, true);
req.onreadystatechange = function () {
var ready = req.readyState;
var data = null;
if (ready == 4) {
xmlResult = req.responseText;
document.getElementById('DIV_LIST').innerHTML = "";
document.getElementById('DIV_LIST').innerHTML = xmlResult;
}
else {
document.getElementById('DIV_LIST').innerHTML = loadPagesImage;
}
}
req.send("");
}
}
}
SetDeviceUAgent();
function SetDeviceUAgent() {
if (navigator.userAgent.indexOf('iPhone') > 0) {
uAgent = "&iphone=true";
} else if (navigator.userAgent.indexOf('MSIE') > 0) {
uAgent = "&MSIE=true";
}
else {
uAgent = "";
}
}
function SearchProductAtInfiniView() {
var InfiniView = document.getElementById("frame_details");
InfiniView.src = "../loadingpage.html"
var CommandBar = GlobalObject("ACTIVECOMMANDS");
if (CommandBar.style.visibility == "visible") {
CommandBar.style.display = 'none';
}
hideWorkFlow();
var xmlResult;
var iChars = "!@#$%^*()+=<-[]\\\`~';,./{}|\":>&?";
var textboxValue;
textboxValue = document.getElementById("ProductSearch1_searchtxt").value;
for (var i = 0; i < textboxValue.length; i++) {
if (iChars.indexOf(textboxValue.charAt(i)) != -1) {
textboxValue = "error"
var queryString = "?ProductSearch=" + textboxValue;
var queryString = "?ProductSearch=" + textboxValue;
InfiniView.src = "AJAX/ProductDisplayAtInfiniView.aspx" + queryString;
}
}
if (document.getElementById("ProductSearch1_searchtxt").value == "") {
var queryString = "?ProductSearch=" + document.getElementById("ProductSearch1_searchtxt").value;
var queryString = "?ProductSearch=" + textboxValue;
InfiniView.src = "AJAX/ProductDisplayAtInfiniView.aspx" + queryString;
}
else if (document.getElementById("ProductSearch1_searchtxt").value != "") {
textboxValue = document.getElementById("ProductSearch1_searchtxt").value;
var req = null;
req = initXMLHTTPRequest();
if (req) {
var queryString = "?ProductSearch=" + textboxValue;
req.open("GET", "AJAX/ProductDisplayAtInfiniView.aspx" + queryString, true);
req.onreadystatechange = function () {
var ready = req.readyState;
if (ready == 4) {
var queryString = "?ProductSearch=" + textboxValue;
InfiniView.src = "AJAX/ProductDisplayAtInfiniView.aspx" + queryString;
}
else {
InfiniView.src = "../loadingpage.html"
}
}
req.send();
}
}
}
function GlobalObject(objID) {
try {
if (document.getElementById(objID)) {
return document.getElementById(objID);
}
if (parent.document.getElementById(objID)) {
return parent.document.getElementById(objID);
}
}
catch (e) {
return document.all(objID);
}
}
function GetUAgentMainScript() {
var UserAgnt = navigator.userAgent.toLowerCase();
var re = new RegExp("webkit/[5-9]|iemobile/[7-9]");
if ((UserAgnt.indexOf('iphone') >= 0) || (UserAgnt.indexOf('ipad') >= 0)) {
return "iPhone";
}
else if (UserAgnt.indexOf('android') >= 0) {
return "android";
}
else if (UserAgnt.indexOf('blackberry') >= 0 && UserAgnt.match(re)) {
return "iPhone";
}
else if (UserAgnt.indexOf('symbianos/') >= 0 && UserAgnt.match(re)) {
return "iPhone";
}
else if (UserAgnt.indexOf('msie') >= 0 && UserAgnt.match(re)) {
return "iPhone"
}
else if (UserAgnt.indexOf('cfnetwork') >= 0 || UserAgnt.indexOf('darwin') >= 0) {
return "iPhone";
}
else if (getQueryVariable('setapptype') == 'fbapp') {
return "iPhone";
}
else {
return "";
}
}
var oldCatID = null;
var oldRowID = null;
function CategoryMouseOutRestoreColor(CurrentCatID, rowID) {
if (oldCatID != CurrentCatID && oldCatID != null) {
rowProbkgdOut(oldRowID);
hyperLinkColorOut(oldCatID);
}
oldCatID = CurrentCatID;
oldRowID = rowID;
}
function GetValueFromString(URLQuery, paramname) {
var query_new = URLQuery;
var vars = query_new.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0].toLowerCase() == paramname) {
if (pair[1] != 'undefined') {
return pair[1];
}
}
}
}
function SignoutConformationbox() {
var UserAgnt = navigator.userAgent.toLowerCase();
var re = new RegExp("webkit/[5-9]|iemobile/[7-9]");
if (UserAgnt.indexOf('msie') >= 0 && UserAgnt.match(re)) {
var URL = window.location.protocol + "//" + window.location.host + "/Customer/signout.aspx";
window.location = URL;
}
else {
var answer = confirm("Are you sure you want to signout?");
if (answer) {
var myDate = new Date();
var myTime = myDate.getTime();
var nURL = window.location.protocol + "//" + window.location.host + "/Customer/signout.aspx?t=" + myTime;
window.location.href = '/redirect.aspx?signout=1';
}
}
}
function isIPhoneApp() {
var usrAgnt = navigator.userAgent.toLowerCase();
if ((usrAgnt.indexOf('iphone') >= 0) && !(usrAgnt.indexOf('safari') >= 0)) {
return true;
}
}
var xmlHttp;
var childid;
var lengthc;
var status;
var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0;
var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5") != -1) ? 1 : 0;
var is_opera = ((navigator.userAgent.indexOf("Opera6") != -1) || (navigator.userAgent.indexOf("Opera/6") != -1)) ? 1 : 0;
var is_netscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0;
function getChildBalanceSheet(str1) {
var str = document.getElementById(str1);
var divQCproducts = document.getElementById("toplayerlayer2");
if (!str.value == '') {
var req = null;
req = initXMLHTTPRequest();
if (req) {
req.open("GET", "../Customer/GetRelatedBusiness.aspx?q=" + str.value, true);
req.onreadystatechange = function () {
var ready = req.readyState;
if (ready == 4) {
if (req.responseText != '') {
overlay(str, 'toplayerlayer2', 'leftbottom');
divQCproducts.style.display = "block";
var newDiv = document.createElement('div');
newDiv.innerHTML = req.responseText; //xmlReq.responseText;
divQCproducts.innerHTML = ''; //xmlResult;
divQCproducts.appendChild(newDiv);
}
else {
divQCproducts.style.display = "none";
}
}
else {
}
}
req.send();
}
}
else {
divQCproducts.style.display = "none";
}
}
function setvalue(e, lstMyList) {
if (!e) e = window.event;
var selectName;
if (e.keyCode) {
switch (e.keyCode) {
case 0:
break;
case 37:
break;
case 38:
break;
case 39:
break;
case 40:
break;
case 9: try {
for (i = 0; i < lstMyList.length; i++) {
if (lstMyList.options[i].selected) {
if (document.getElementById('RegistrationForm1_BusinessDescription')) {
document.getElementById('RegistrationForm1_BusinessDescription').value = lstMyList.options[i].value;
}
else if (document.getElementById('Customer_Register_ShortWeb1_BusinessDescription')) {
document.getElementById('Customer_Register_ShortWeb1_BusinessDescription').value = lstMyList.options[i].value;
}
}
}
document.getElementById("toplayerlayer2").innerHTML = "";
document.getElementById("toplayerlayer2").style.display = "none";
if (document.getElementById('RegistrationForm1_cart_customer_pass')) {
document.getElementById('RegistrationForm1_cart_customer_pass').focus();
}
else if (document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass')) {
document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass').focus();
}
}
catch (e) {
}
break;
case 13: try {
for (i = 0; i < lstMyList.length; i++) {
if (lstMyList.options[i].selected) {
if (document.getElementById('RegistrationForm1_BusinessDescription')) {
document.getElementById('RegistrationForm1_BusinessDescription').value = lstMyList.options[i].value;
}
else if (document.getElementById('Customer_Register_ShortWeb1_BusinessDescription')) {
document.getElementById('Customer_Register_ShortWeb1_BusinessDescription').value = lstMyList.options[i].value;
}
}
}
document.getElementById("toplayerlayer2").innerHTML = "";
document.getElementById("toplayerlayer2").style.display = "none";
if (document.getElementById('RegistrationForm1_cart_customer_pass')) {
document.getElementById('RegistrationForm1_cart_customer_pass').focus();
}
else if (document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass')) {
document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass').focus();
}
}
catch (e) {
}
break;
default:
break;
}
}
else if (e.which) {
if (e.which <= 1) {
try {
for (i = 0; i < lstMyList.length; i++) {
if (lstMyList.options[i].selected) {
if (document.getElementById('RegistrationForm1_BusinessDescription')) {
document.getElementById('RegistrationForm1_BusinessDescription').value = lstMyList.options[i].value;
}
else if (document.getElementById('Customer_Register_ShortWeb1_BusinessDescription')) {
document.getElementById('Customer_Register_ShortWeb1_BusinessDescription').value = lstMyList.options[i].value;
}
document.getElementById("toplayerlayer2").style.display = "none";
if (document.getElementById('RegistrationForm1_cart_customer_pass')) {
document.getElementById('RegistrationForm1_cart_customer_pass').focus();
}
else if (document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass')) {
document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass').focus();
}
}
}
}
catch (e) {
}
}
}
else if (e.button) {
if (e.button <= 1) {
try {
for (i = 0; i < lstMyList.length; i++) {
if (lstMyList.options[i].selected) {
if (document.getElementById('RegistrationForm1_BusinessDescription')) {
document.getElementById('RegistrationForm1_BusinessDescription').value = lstMyList.options[i].value;
}
else if (document.getElementById('Customer_Register_ShortWeb1_BusinessDescription')) {
document.getElementById('Customer_Register_ShortWeb1_BusinessDescription').value = lstMyList.options[i].value;
}
document.getElementById("toplayerlayer2").style.display = "none";
if (document.getElementById('RegistrationForm1_cart_customer_pass')) {
document.getElementById('RegistrationForm1_cart_customer_pass').focus();
}
else if (document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass')) {
document.getElementById('Customer_Register_ShortWeb1_cart_customer_pass').focus();
}
}
}
}
catch (e) {
}
}
}
}
function CursorKeyDown(e) {
if (!e) e = window.event;
var selectName;
switch (e.keyCode) {
case 37:
break;
case 38:
break;
case 39:
break;
case 40:
{
var controls = document.getElementById('GetRelatedBusiness1_RelatedBusiness');
controls.focus();
controls.hideFocus = false;
controls.options[0].selected = true;
}
break;
default:
var hh = e.keyCode;
{
if (document.getElementById('RegistrationForm1_BusinessDescription')) {
getChildBalanceSheet('RegistrationForm1_BusinessDescription');
}
else if (document.getElementById('Customer_Register_ShortWeb1_BusinessDescription')) {
getChildBalanceSheet('Customer_Register_ShortWeb1_BusinessDescription');
}
}
break;
}
}
function HidebusinessDescription() {
try {
document.getElementById("toplayerlayer2").style.display = "none";
}
catch (e) { }
}
function overlay(curobj, subobjstr, opt_position) {
if (document.getElementById) {
var subobj = document.getElementById(subobjstr)
subobj.style.display = "block";
var xpos = getposOffset(curobj, "left") + ((typeof opt_position != "undefined" && opt_position.indexOf("right") != -1) ? -(subobj.offsetWidth - curobj.offsetWidth) : 0)
var ypos = getposOffset(curobj, "top") + ((typeof opt_position != "undefined" && opt_position.indexOf("bottom") != -1) ? curobj.offsetHeight : 0)
subobj.style.left = (xpos + 15) + "px"
subobj.style.top = (ypos + 5) + "px"
return false
}
else
return true
}
function getposOffset(overlay, offsettype) {
var totaloffset = (offsettype == "left") ? overlay.offsetLeft : overlay.offsetTop;
var parentEl = overlay.offsetParent;
while (parentEl != null) {
totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
parentEl = parentEl.offsetParent;
}
return totaloffset;
}
function FavProductControl(ProductId, Action) {
var myDate = new Date();
var myTime = myDate.getTime();
if (Action) {
var requestURL = window.location.protocol + '//' + window.location.host + '/AJAX/FavBarResult.aspx?product_id=' + ProductId + '&Action=' + Action + '&t=' + myTime;
}
else {
var requestURL = window.location.protocol + '//' + window.location.host + '/AJAX/FavBarResult.aspx?t=' + myTime;
}
if (Action == 'remove') {
try {
var xmlRequest = DoCallback(requestURL, "");
var res = xmlRequest.responseText;
document.close();
onewdoc = document.open("text/html", "replace");
onewdoc.write(res);
onewdoc.close();
} catch (ex) {
alert(ex);
}
}
else {
parent.window.frames["frame_details"].location.href = requestURL;
}
UnLoadCommands();
loadDefaultButtonsForApp();
}
function SendMessageToCRM(URL) {
try {
SetSource(URL);
frame_details.event.cancelBubble = true;
} catch (ex) {
alert("SendMessageToCRM: " + ex);
}
}
function GetDeviceType() {
var UserAgnt = navigator.userAgent.toLowerCase();
var re = new RegExp("webkit/[5-9]|iemobile/[7-9]");
if ((UserAgnt.indexOf('iphone') >= 0) || (UserAgnt.indexOf('ipad') >= 0)) {
return "iphone";
}
else if (UserAgnt.indexOf('android') >= 0) {
return "android";
}
else if (UserAgnt.indexOf('blackberry') >= 0 && UserAgnt.match(re)) {
return "blackberry";
}
else if (UserAgnt.indexOf('symbianos/') >= 0 && UserAgnt.match(re)) {
return "symbianos";
}
else if (UserAgnt.indexOf('msie') >= 0 && UserAgnt.match(re)) {
return "msie";
}
else if (UserAgnt.indexOf('cfnetwork') >= 0 || UserAgnt.indexOf('darwin') >= 0) {
return "cfnetwork-darwin";
}
else if (getQueryVariable('setapptype') == 'fbapp' && UserAgnt.match(re)) {
return "iPhone";
}
else {
return "";
}
}
function googleMap(id, distance, lat, lng) {
var reqURL = 'http://shops.infini.com/mobile/googleMap.aspx?id=' + id + '&distance=' + distance + '&lat=' + lat + '&lng=' + lng;
parent.window.frames["frame_details"].location.replace(reqURL);
}
function onFBReturn(query) {
var url1;
var FBVerificationCode = escape(getQueryVariable(query, "FBVerificationCode"));
var redirectURI = getQueryVariable(query, "redirectURI");
try {
if (FBVerificationCode != 'false') {
url1 = window.location.protocol + '//' + window.location.host + '/Customer/FB_SignIn.aspx?FBVerificationCode=' + FBVerificationCode + "&redirectURI=" + redirectURI;
window.location = url1;
}
else {
}
}
catch (e) {
alert(e);
}
}
function getQueryVariable(query, variable) {
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
if (pair.length > 2) {
return pair[1] + '=' + pair[2];
}
else {
return pair[1];
}
}
}
return 'false';
}
function SignInShow(Url) {
SetSource(Url);
}

