﻿// JScript File
function popUpLargeImage(picArray)
			{
				theURL="/products/PopUpImage.aspx?picArray="+picArray; 
				winName="ExclusiveListingsImages";
				features="width=400,height=400";
				window.open(theURL,winName,features);
			}
function imageWindow(outsole)
			{
				theURL="/products/PopUpImage.aspx?outsole="+outsole; 
				winName="ExclusiveListingsImages";
				features="width=200,height=400";
				window.open(theURL,winName,features);
			}

function popUp(URL, w1, h1) 
			{
				id = "ejwindow";
				
				if (parent.window.frames[id] != null && ! parent.window.frames[id].closed) {	

					eval(id + ".close()");
				}
				
				eval(id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + w1 + ",height=" + h1 + "');");	
				eval(id + ".focus()");	
			}

function ShowDiv(div)
{
    if(div)
    {
        div.style.display="block";
    } 
}

function HideDiv(div)
{
    if(div)
    {
        div.style.display="none";
    } 
}

function ApplyClass(obj,classname)
{
    if(obj)
        obj.className=classname;
}

function removeStyle(obj)
{
    if(obj)
    {
        obj.style.textDecoration = "none";
        obj.style.cursor = "default";
     }   
}

function applyStyle(obj)
{
    if(obj)
    {
        obj.style.textDecoration = "underline";
        obj.style.cursor = "pointer";
    }
}
var query='';
function wait(delay)
{
    string="pauseforalert("+delay+");";
    setTimeout(string,delay);
}

function pauseforalert(delay)
{
    var newwindow = '';
    theURL= query
    winName="RockyBoots"
    features="scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1"

    newwindow = window.open(theURL,winName,features);
    if (window.focus) 
    {
      newwindow.focus()
    }
}

function openBuyNowLink(querystring)
{
    query = querystring;
    //theURL="http://localhost:1946/RockyBoots/products/intermediate.aspx"
    theURL="http://www.rockyboots.com/Products/intermediate.aspx"
    winName="RockyBoots"
    features="scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1"

     newwindow = window.open(theURL,winName,features);
      if (window.focus) 
      {
        newwindow.focus()
      }
      wait(6000);
      return false;
}

function CheckNumeric(e)
{
  var key //= (window.event) ? event.keyCode : e.which;
  if (window.event)
    {key = event.keyCode}
    else
    {key = e.which}
 
  if (key!=8 )
  {
      if ( key > 47 && key < 58 )
        return; // if so, do nothing
      else // otherwise, discard character

        if (window.event) //IE
          window.event.returnValue = null;     
          else //Firefox
          e.preventDefault();
  }
 }
 var activeImage = false;
 function showImage(obj)
	{
		if(activeImage){
			activeImage.style.filter = 'alpha(opacity=50)';	
			activeImage.style.opacity = 0.5;
		}
		
		obj.style.filter = 'alpha(opacity=100)';
		obj.style.opacity = 1;	
		activeImage = obj;	
	}
