//---------------NO RIGHT CLICK-------------------------------> 
// Message for the alert box
var message = "Sorry, that function is disabled."; 
 
function click(e) 
	{
	if (document.all) 
		{
		if (event.button == 2) 
			{
			alert(message);
			return false;
			}
		}
	if (document.layers) 
		{
		if (e.which == 3) 
			{
			alert(message);
			return false;
			}
		}
	}
	
if (document.layers) 
	{
	document.captureEvents(Event.MOUSEDOWN);
	}
document.onmousedown=click;
//------------------------------------------------------------>

//-----------POP UP FUNCTIONs--------------------------------->
var win;

function isOpen() 
	{
	return (win && !win.closed);
	}

function doClose() 
	{
	if (isOpen()) 
		win.close();
	}
	
//centers popup based on win dimensions
function WinPos(hi,wi) 
	{
	var height=hi;
	var width=wi;

	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;

	if (window.screen) 
		{
	    var ah = screen.availHeight - 30;
	    var aw = screen.availWidth - 10;

	    var xc = (aw - width) / 2;
	    var yc = (ah - height) / 2;

	    str += ",left=" + xc + ",screenX=" + xc;
	    str += ",top=" + yc + ",screenY=" + yc;
		}

	return str;
	}

function PopWin(link,h,w,other)  
	{
	//Closes any open windows, if any
	doClose(); 

	var arrLink =  link.split("."); //examine file extension
	var strExt = (arrLink.length>0)?arrLink[1]:"";  //store file extension
	var isIMG = (strExt=='jpg'||strExt=='jpeg'||strExt=='gif')?true:false; 
	var height = h;
	var width = w;

	if (isIMG == false)
		{
		if (!height)
			{
			if (window.screen) 
				height = .75 * screen.availHeight;
			else
				height = 600;
			}

		if (!width)
			{
			if (window.screen) 
    			width = .60*(screen.availWidth);
			else
				width = 400;
			}
		}
	//if it is an IMG
	else 
		{
		height = 400;
		width = 400;
		}

	//Center on screen
	var str = WinPos(height,width); 

	if(other)
		{
		other = "," + other;
		}

	//stores page type url
	var hurl; 

	//Special url for images
	if (isIMG)
		{
		hurl="/images/ImgPopWin.html?" + link;
		}
	else
		{
		hurl =  "/" + link;
		other += ", resizable,scrollbars"; //special attributes for product pages
		}

	win = window.open(hurl, "win",str + other); //CREATE window 
	} 
//--------------------------------------------------------------->
