﻿// JScript File
function search_roll(useID, useID2){
    document.getElementById(useID).src='/images/icon_search_h.png';
    document.getElementById(useID2).style.background='url(/images/search_back_h.png) relative no-repeat right top';
    document.getElementById(useID2).style.color="#cccccc";}
function search_rollo(useID, useID2){
    document.getElementById(useID).src='/images/icon_search.png';
    document.getElementById(useID2).style.background='url(/images/search_back.png) relative no-repeat right top';
    document.getElementById(useID2).style.color="#666666";}
function search_rollt(useID2){document.getElementById(useID2).style.color="#cccccc";}   
function search_rollto(useID2){document.getElementById(useID2).style.color="#666666";}  
function bskremove(product)
{
    //$(product).checked == true;
    document.getElementById(product).checked=true;
    document.basket.submit();
}

function clearDefault(el) 
{
  if (el.defaultValue==el.value) el.value = "";
}

function showOther(str)
{
    c = document.getElementById("title_other");
    if(str =="Other")
    {
        c.style.display="block";
    }
    else
    {
        c.style.display="none";
    }
}


function popimage(spc,colour)
{
    var newwindow;
    newwindow=window.open(spc+"/"+colour+"/imagezoom.html",'name123123awdawdawd123123','height=625,width=700,scrollbars=0,menubar=0,resizable=0,status=0');
	if (window.focus) {newwindow.focus()}
}

function showImage(pcode,pcol,img)
{
document.getElementById("zoom_over").style.display="none";
document.getElementById("mouseWindow").style.display="none";
document.getElementById("side_form").style.display="none";
document.getElementById("fullscreen_container").style.display="block";

var xmlHttp=null;

if (pcode.length==0)
  { 
  document.getElementById("fullscreen_container").innerHTML="";
  return;
  }
try
  {
  xmlHttp=new XMLHttpRequest();
  }
catch(e)
  {
  try
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  catch(e)
    {
    alert ("Your browser does not support XMLHTTP!");
    return;  
    }
  }
var url="fullscreen.asp";
url=url+"?pcode=" + pcode;
url=url+"&pcol=" + pcol;
url=url+"&img=" + img;
url=url+"&sid="+Math.random();
xmlHttp.open("GET",url,false);
xmlHttp.send(null);
document.getElementById("fullscreen_container").innerHTML=xmlHttp.responseText;
}

function hideImage()
{
document.getElementById("side_form").style.display="block";
document.getElementById("fullscreen_container").style.display="none";
document.getElementById("fullscreen_container").innerHTML="";
}

function Highlight(id)
{
    var storediv = document.getElementById(id)
	if(storediv) {
	    storediv.style.backgroundColor = '#eaeff5';
	}
}

function UnHighlight(id)
{
    var storediv = document.getElementById(id)
	if(storediv) {
	    storediv.style.backgroundColor = '#ffffff';
	}
}
