﻿var url1 ="/misc/entertowin/";
		var url2 ="/products/search/mens_footwear/";
		var url3 ="/products/details.aspx?productId=97&lehighproductId=15007324R&Gender=02";
		var url5 ="/products/search/search-rockport/";
		var url4 = "/products/search/search-converse/";
		
//		var url6 ="http://www.slipgrips.com/dickiesepicsale/";
        var url6 ="http://www.slipgrips.com/products/search/search-dickies/offer-boghalf/";
		var url7 = "http://www.slipgrips.com/context_chooser.aspx";
//		var url7 = "http://www.slipgrips.com/products/search/search-michelin/";
	    var url8 = "http://www.slipgrips.com/slip-resistant-brands";
//		var url8 = "/products/search/search-Merrell/";
		//var url8 = "/Products/search/gender-03/c-Slip_Resistant_Booots_And_Shoes/OBy-PRODUCTPRICE_ASC/offer-laborday/"
		// Initialize Slides
		ss = new slideshow("ss");

		// Setup Slide Show
		ss.set_timer(14000);							// Set Time Limit
		ss.slide_image_object("SlideShow_image");	// Set Image Object
		ss.slide_div_object("SlideShow_div");		// Set Div Object
		ss.slide_text_object("SlideShow_text");		// Set Text Object
		ss.slide_url_object("SlideShow_url");		// Set URL Object

		// Add Slides
		//ss.add_slide("images/slideshow/Slide1.jpg",url1,"<a target='_blank' href=\""+url1+"\">So, after wearing your pair of slip-resistant shoes around for a few weeks you can just return the shoes straight back to Lehigh without hassle.  That's crazy!</a>","_blank");
		//ss.add_slide("images/slideshow/Slide2.jpg",url2,"<a href=\""+url2+"\"></a>","_self");
		//ss.add_slide("images/slideshow/Slide3.jpg",url3,"<a target='_blank' href=\""+url3+"\"></a>","_blank");
		
		//ss.add_slide("images/slideshow/Slide1_new.jpg",url1,"We are ready to send you and a friend out for dinner. Take a shot<br>at winning a free meal from many great restaurants!  Click to enter.","_self");
		//ss.add_slide("images/slideshow/Slide2_new.jpg",url2,"SlipGrips.com carries the Largest selection of slip resistant and <br> non-slip shoes for the restaurant, safety and hospitality industries.","_self");
		ss.add_slide("images/slideshow/Slide7_new.jpg", url7, "Pro Step Products", "_self");
		//ss.add_slide("images/slideshow/Slide9_new.jpg", url8, "Stay on your feet day-in and day-out in these slip-resistant shoes  <br/> from our newest brand addition of Merrell. Check out the Encore.", "_self");
		ss.add_slide("images/slideshow/Slide8_new.jpg", url8, "Stay on your feet day-in and day-out in these slip-resistant shoes  <br/> from our newest brand addition of Merrell. Check out the Encore.", "_self");
		ss.add_slide("images/slideshow/Slide6_new.jpg",url6,"Select Dickies styles up to 60% off and as low as $17.98.<BR/> It's incredible savings no matter how you do the math.","_self");
		//ss.add_slide("images/slideshow/Slide5_new.jpg",url5,"And for those who LOVE comfort and go for style, you may <BR> want to try a little Rockport action on your feet","_self");
		//ss.add_slide("images/slideshow/Slide4_new.jpg",url4,"It's all about VARIETY!  Check out our awesome selection of <BR> slip resistant shoes.  How about this sweet style'n slip-on shoe?","_self");
		
		//ss.add_slide("images/slideshow/Slide3_new.jpg",url3,"Slip-resistant, athletic, comfortable and always a killer value. <br>Click this link to check out our full line of men's SlipGrips styles.","_self");
		
		
		 var activeImage = false;
		 
		
		 
    function showImage(obj)
	{
		if(activeImage){
			activeImage.style.filter = 'alpha(opacity=100)';	
			activeImage.style.opacity = 1;
			//alert('dd')
		}
		
		obj.style.filter = 'alpha(opacity=50)';
		obj.style.opacity = 0.5;	
		activeImage = obj;	
	}
		
		
		
		function setContent(pid)
		{
		
		// alert(pid)
	//	 alert(eval('pName'+pid))
		 document.getElementById('longDesc').innerHTML=eval('pName'+pid)
		// document.getElementById('rprice').innerHTML=eval('pRetailPrice'+pid)
		// document.getElementById('oprice').innerHTML=eval('pOurPrice'+pid)
		
		if(eval('pRetailPrice'+pid)>0)
		{
		document.getElementById('price').innerHTML ="Our Price: <span id='oprice' style='text-decoration:line-through;color:#000000;'><STRIKE style='color:#FF0000;'>" + eval('pOurPrice'+pid) +  "</STRIKE></span><br><img src='images/s.gif' width='81' height='1' alt=''/><span align='right' style='font: bold 16px arial;color:#000000'>$" + eval('pRetailPrice'+pid) + "</span>"
		}
		else
		{
		document.getElementById('price').innerHTML=  "Our Price: <span id='oprice'>"  + eval('pOurPrice'+pid) +  "</span>"
		}
		// document.getElementById('desc').innerHTML=eval('pDesc'+pid)
		document.getElementById('mainImg').src='https://sitemanager.rockyboots.com/productimages/lehigh-old/individual/' +  eval('pImage'+pid)
		//document.getElementById('buynow').href='http://www.slipgrips.com/products/detail.aspx?frommainpage=1&productid=' + +pid + '@lehighproductid=' + eval('pLehighId'+pid)
		document.getElementById('buynow').href='./products/'  + pid + '/' + eval('pLehighId'+pid) + '/' + eval('prwName'+pid) + '/' 
		document.getElementById('mainImageURL').href='./products/'  + pid + '/' + eval('pLehighId'+pid) + '/'   + eval('prwName'+pid) + '/' 
		
		
		}
		
		function search(e)
{

	if(document.all)
	
	
	{  
	//alert(e.keyCode)
	//alert()
		if(e.keyCode==13)
		{
		  if(document.getElementById("topsearch").value=='')
		  {
		    alert('Please enter search text')
		    document.getElementById("topsearch").focus();
		    return false;
		  }
		  else
		  {
		  document.location.href='products/search/search-' + document.getElementById("topsearch").value + '/'
		   return true; 
		  } 
		}
		//alert(e.keyCode);

     }
	else
	 {
	 
	 if(e.which==13)
		{
	     //alert(e.which);
	     if(document.getElementById("topsearch").value=='')
		  {
		    alert('Please enter search text')
		    document.getElementById("topsearch").focus();
		    return false;
		  } 
		  else
		  {
		    document.location.href='products/search/search-' + document.getElementById("topsearch").value + '/'
		    return true;  
		  }  
		  
		}
		//alert('Success.....')
		
      }


//topsearch
	//document.getElementById("t1").value=document.getElementById("t1").value + code + ','

}



function numbersonly(myfield, e, dec) {
 var key;
 var keychar;

 if (window.event)
    key = window.event.keyCode;
 else if (e)    key = e.which;
 else
    return true;
 keychar = String.fromCharCode(key);
 

 if (key==13)
	setTimeout('go();',20);
else
	 return true;	
}



function siteSearch()
{

	
    //var frm = document.frmmain;
    
    if( document.getElementById('topsearch').value == ""  || document.getElementById('topsearch').value == "enter search")
	{
	  alert('Please enter value in the search box')	
	  document.getElementById('topsearch').focus();
	  return false;
	}
	
	
	//document.forms[0].method="GET"
	//document.location.href="https://www.lehighsafetyshoes.com/products/default.aspx?search=" + frm.topsearch.value
	//document.forms[0].action="https://www.lehighsafetyshoes.com/products/default.aspx?search=" + frm.topsearch.value
	
	document.location.href='products/search/search-' + document.getElementById("topsearch").value + '/'
	
	//alert('fddddf')
	
	
}


function go()
{
   //var frm = document.frmmain;
   document.location.href='products/search/search-' + document.getElementById("topsearch").value + '/'
}
function fadebackground()
    {
		document.getElementById("Advances").style.display="block";
		document.getElementById("fade").style.display="block";
    }
