function ActiveItem(el, DescBox, colour) { el.style.cursor = 'pointer'; }
function changeimage(srcval, el, smallsrc, ImgName, URLPartCode) {
    document.getElementById('extraimage').src = srcval; document.getElementById('extraimage').width = '200'; document.getElementById('extraimage').height = '200'; el.src = smallsrc; el.width = '40'; el.height = '40'; if (ImgName == 'Original')
    { document.getElementById('ImageLink').href = 'ProductImages.asp?pn=' + URLPartCode; }
    else
    { document.getElementById('ImageLink').href = 'ProductImages.asp?pn=' + URLPartCode + '&img=' + ImgName; } 
}
function ActiveItemout(elval, colour) { }
function tabbgchange(el, colourstr)
{ el.style.backgroundColor = colourstr; el.style.color = '#FF3399'; el.style.cursor = 'pointer'; }
function tabbgchangeback(el, colourstr)
{ el.style.backgroundColor = colourstr; el.style.color = '#333333'; }
function Homepagehover(el, colourstr)
{ el.style.cursor = 'pointer'; el.style.backgroundColor = colourstr; }
function Homepagehoverout(el, colourstr)
{ el.style.backgroundColor = colourstr; }
function leftmenuhover(el, colourstr)
{ el.style.cursor = 'pointer'; el.style.backgroundColor = colourstr; }
function leftmenuhoversubout(el, colourstr, BlockCell)
{ el.style.cursor = 'pointer'; el.style.backgroundColor = colourstr; document.getElementById(BlockCell).style.display = 'none'; }
function leftmenuhoversub(el, colourstr, BlockCell)
{ el.style.cursor = 'pointer'; el.style.backgroundColor = colourstr; document.getElementById(BlockCell).style.display = 'block'; }
function gotoLink(link) { location.href = link; }
function image_display(Value) {
    tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("images/products/"); location = location + id; if (tools.FileExists(location))
    { image = "images/products" + Value + ".jpg" }
    else {
        tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("images/smallopenproducts/"); location = location + id; if (tools.FileExists(location))
        { image = "images/smallopenproducts" + Value + ".jpg" }
        else {
            if (session("MAccount Code") != null)
            { image = "systemsassurance/images/blank.gif" }
            else
            { image = Session("shop") + "/images/blank.gif" } 
        } 
    }
    tools = "nothing"; Value = 0; Response.Write(image);
}
function systems_image_display(Value) {
    tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("productimages/products/"); location = location + id; if (tools.FileExists(location))
    { image = "productimages/products" + Value + ".jpg" }
    else {
        tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("productimages/smallopenproducts/"); location = location + id; if (tools.FileExists(location))
        { image = "productimages/smallopenproducts" + Value + ".jpg" }
        else {
            if (session("MAccount Code") != null)
            { image = "/images/blank.gif" }
            else
            { image = "/images/blank.gif" } 
        } 
    }
    tools = "nothing"; Value = 0; Response.Write(image);
}
function systems_image_nonedisplay(Value_check, code_check) {
    tools_check = Server.CreateObject("scripting.FilesystemObject"); id_check = Value_check + ".jpg"; location_check = Server.Mappath("productimages/products/"); location_check = location_check + id_check; if (tools_check.FileExists(location_check))
    { image_check = "productimages/products" + Value_check + ".jpg" }
    else {
        if (session("MAccount Code") != null)
        { image_check = "/images/blank.gif" }
        else
        { image_check = Session("shop") + "/images/blank.gif" } 
    }
    tools_check = "nothing"; Value_check = 0; return image_check;
}
function image_display1(Value) {
    tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("images/largeproducts/"); location = location + id; if (tools.FileExists(location))
    { image = "images/largeproducts" + check_hash(Value) + ".jpg" }
    else {
        tools = Server.CreateObject("scripting.FilesystemObject"); name = Value + ".jpg"; position = Server.Mappath("images/openproducts/"); position = position + name; if (tools.FileExists(position))
        { image = "/images/openproducts/" + check_hash(Value) + ".jpg" }
        else {
            tools = Server.CreateObject("scripting.FilesystemObject"); name2 = Value + ".jpg"; position2 = Server.Mappath("images/products/"); position2 = position2 + name2; if (tools.FileExists(position2))
            { image = "/images/products/" + check_hash(Value) + ".jpg" }
            else
            { image = "/images/largeproducts/noimage.jpg" } 
        } 
    }
    tools = "nothing"; Value = 0; Response.Write(image);
}
function systems_image_display1(Value) {
    tools = Server.CreateObject("scripting.FilesystemObject"); id = Value + ".jpg"; location = Server.Mappath("productimages/largeproducts/"); location = location + id; if (tools.FileExists(location))
    { image = "productimages/largeproducts" + check_hash(Value) + ".jpg" }
    else {
        tools = Server.CreateObject("scripting.FilesystemObject"); name = Value + ".jpg"; position = Server.Mappath("productimages/openproducts/"); position = position + name; if (tools.FileExists(position))
        { image = "/productimages/openproducts" + check_hash(Value) + ".jpg" }
        else {
            tools = Server.CreateObject("scripting.FilesystemObject"); name = Value + ".jpg"; position = Server.Mappath("productimages/products/"); position = position + name; if (tools.FileExists(position))
            { image = "/productimages/products" + check_hash(Value) + ".jpg" }
            else
            { image = "/productimages/largeproducts/noimage.jpg" } 
        } 
    }
    tools = "nothing"; Value = 0; Response.Write(image);
}
function delete_for(form, name) {
    test = eval("document.all." + form + "." + name + ".value"); d = "document.all." + form + "." + name + ".value"; test1 = eval("document.all." + form + "." + name); pos = 0; leng = test.length
    count = 0; for (pos = 0; pos < leng; pos++) {
        if (isNaN(test.substring(pos, pos + 1)) == true)
        { count = 1; rExp = /\D*/g; newstring = new String(""); checker = test.replace(rExp, newstring); eval(d + "=" + "'" + checker + "'"); } 
    }
    if (count == 1)
    { again = setTimeout("delete_for('" + form + "','" + name + "')", 1); } 
}
function somethingthere(form, name) {
    change = eval("document." + form + "." + name + ".value.length"); if (change < 1)
    { eval("document." + form + "." + name + ".value = 1"); } 
}
function dont() {
    if (event.keyCode == 13)
    { alert("Please don't press Enter or Return during this process"); event.keyCode = 0; } 
}
function somethingthere(form, name) {
    change = eval("document." + form + "." + name + ".value.length"); if (change < 1)
    { eval("document." + form + "." + name + ".value = 1"); } 
}
function format_page()
{ document.submitorder.CardHolder.value = ""; document.submitorder.CreditCard.value = ""; document.submitorder.CCNo.value = ""; document.submitorder.IssueNo.value = ""; document.submitorder.aboutus.value = ""; }
function brands() { document.getElementById('brands').style.display = 'block'; document.getElementById('categories').style.display = 'none'; document.getElementById('brandssub').style.display = 'block'; document.getElementById('categoriesssub').style.display = 'none'; }
function categories() { document.getElementById('categories').style.display = 'block'; document.getElementById('brands').style.display = 'none'; document.getElementById('brandssub').style.display = 'none'; document.getElementById('categoriesssub').style.display = 'block'; }
function checkshop(shop, el, link) { el.style.background = '#F3f3f3'; el.innerHTML = shop + " - Loading"; location.href = link; }
function changeActiveLink(el, colour) { el.style.background = colour; el.style.cursor = 'pointer'; }
function changeNormalLink(el, colour) { el.style.background = colour; }
function gotoActiveLink(link) { location.href = link; }
function checkLength() {
    if (document.advancedsearch.query_info.value.length > 1)
    { return true; }
    else
    { alert("please be more specific"); return false; } 
}
function pagerefine(action)
{ document.getElementById('refine').action = action; document.getElementById('refine').submit(); }
function nextpage(pagenum) { document.SalesAssistant.PageNo.value = pagenum; document.SalesAssistant.submit(); }
function OpenWindow2(url) { window.open(url, "_blank", "toolbar=Yes, location=No, directories=Yes, status=Yes, menubar=Yes, scrollbars=yes, resizable=Yes, copyhistory=yes, top=0, Left=0") }
function OpenWindow(url) { window.open(url, "_blank", "toolbar=Yes, location=No, directories=Yes, status=Yes, menubar=Yes, scrollbars=yes, resizable=Yes, copyhistory=yes, top=0, Left=0") }
function addBookMark() {
    who = '<%=session("strpagetosend")%>'; title = 'Morecomputers Product <%=server.HTMLEncode(altstrtitle)%>'; ver = navigator.appName
    num = parseInt(navigator.appVersion)
    if ((ver == 'Microsoft Internet Explorer') && (num >= 4))
    { window.external.AddFavorite(who, title); }
    else
    { alert("Please press ctrl+D to bookmark this page"); } 
}
function MM_openBrWindow(theURL, winName, features)
{ window.open(theURL, winName, features); }
function RunLoadingGifProductPage()
{ var imageObj = document.getElementById("loadingProductPageGif"); imageObj.style.display = 'inline'; setTimeout(function() { imageObj.src = imageObj.src; }, 50); }