

function CheckForPO(obj)
{
	regex = /^\s*\bp\.?\s*o\.?\s*/i;
	if( regex.test(obj.value) )
	{
		alert("Cannot ship to P.O. Box.\nPlease change the Ship To Street field.");
		obj.focus();
		obj.select();
		return false;
	}
	else
	{
		obj.value = obj.value + "";
		return true;
	}
}



if(document.layers) // NS 4
{
	document.write('<STYLE TYPE="text/css">');
	document.write('TD { font-size : 12px; }\n');
	document.write('.hiRes { font-size : 11px; }\n');
	document.write('.catTitle { font-size : 14px; }\n');
	document.write('.itmTblItems { font-size : 11px; }\n');
	document.write('.itmTblhdrs { font-size : 11px; }\n');
	document.write('</STYLE>');		
}



if(document.layers) // NS 4
{
	document.write('<STYLE TYPE="text/css">');
	document.write('.catLink, .nav, .copyright { font-size : 11px; }\n');
	document.write('.def, .highlightsInfo { font-size : 11px; }\n');
	document.write('</STYLE>');		
}
else
{	
	document.write('<STYLE TYPE="text/css">');
	document.write('.mnImgBdr { border : 1px solid #00008B; }\n');
	document.write('</STYLE>');	
}

var pic = null
var popImg = null  // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"


function ClosePopWin()
{    // close pop-up window if it is open 
	if (navigator.appName != "Microsoft Internet Explorer" || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popImg != null) 
		if(!popImg.closed)
			popImg.close() 
}

function setStatus(msg)
{
  	status = msg
  	return true
}


var priorPic = new Array()
var noPic = 0
var foundit = false

function openPopImg(picName,  windowTitle, windowWidth, windowHeight, baseURL)
{
  	var i = 0
	
  	if(pic == picName && winOpen())
	{
		popImg.focus()
    }
	else
	{
    	foundit = false
		
    	for(i=0; i<=noPic; i++)
		{
      		if (priorPic[i] == picName)
        	foundit = true
		}
	
		pic = picName;
		ClosePopWin();
    	picTitle = windowTitle;
    	imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
	
    	if(!foundit)
		{
      		priorPic[noPic++] = pic;
		}
		popImg = OpenPopWin(imgWinName, windowWidth, windowHeight, baseURL)
	}
}


function OpenPopWin(imgWinName, windowWidth, windowHeight, baseURL)
{
  	var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width=" 
   					 + windowWidth + ",height=" + windowHeight;
	
	return window.open("" + baseURL + "/images/popup.aspx", imgWinName, winFeatures)
}




function OpenSlideWin(ird, winName, winWidth, winHeight, baseURL)
{
  	var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width=" 
   					 + winWidth + ",height=" + winHeight;	
	window.open("" + baseURL + "/images/slideshow.aspx?ird=" + ird, winName, winFeatures)
}



function winOpen()
{
  	if(popImg != null)
	{ 
   		if(popImg.closed != true) 
			return true; 
		else 
			return false;
    }  
  	else
    	return false
}


function SetBlink() 
{
	if (!document.all) return;
	else 
	{
		for(i=0; i < document.all.tags('blink').length; i++)
		{
			v = document.all.tags('blink')[i];
			v.style.visibility = (v.style.visibility == 'visible') ? 'hidden' : 'visible';
		}
	}
}


function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function testJS()
{
	alert("hello");
}



