//link back to the product page
function linkToProduct(link){
	url = link.href;
	if (window.opener && !window.opener.closed) {
		window.opener.location=url;
	}
	window.close();
}
//function popup(mylink, windowname, width, height, scroll)
//{
        //if (! window.focus)return true;
        //var href;
        //if (typeof(mylink) == 'string')
        //href=mylink;
        //else
        //href=mylink.href;
        //if (scroll==1)
        //window.open(href, windowname, 'scrollbars=yes,status=no,width='+width+',height='+height);
        //else
        //window.open(href, windowname, 'scrollbars=no,status=no,width='+width+',height='+height);
        //return false;
//}

function popup( vURL, vWinName, vWidth, vHeight, vScrollbar)
{
	if (! window.focus)return true;
	
	var vhref;
	var vSWidth = screen.width
	var vSHeight = screen.height
	
	if(vScrollbar == "yes")
	{
		vWidth = new Number(vWidth) + 16
	}
	
	var vleftPos = (vSWidth / 2) - (vWidth / 2)
	var vtopPos = (vSHeight / 2) - (vHeight / 2)
	
	if (typeof(vURL) == 'string')
	{
		vhref = vURL;
	} else {
		vhref = vURL.href;
	}
	window.open(vhref, vWinName, 'scrollbars=' + vScrollbar + ',statusbar=no,menubar=0,width=' + vWidth + ',height=' + vHeight + ',left=' + vleftPos + ',top=' + vtopPos);
	
	return false;
}


// Add bookmark for both browser engines...
function addBookmark(title,url) {
  if (window.sidebar) {
    window.sidebar.addPanel(title, url,"");
  } else if( document.all ) {
    window.external.AddFavorite( url, title);
  } else if( window.opera && window.print ) {
    return true;
  }
} 

//declare the last var and set an initial state (to stop errors), used for faqs
last = '1';

function activateTip(which){
        //remove any existing highlight
        toTheTop();
        
        //apply the new highlight
		document.getElementById('faqDiv'+which).className = 'active';   
		
		//apply the new highlight on the faq menu
		document.getElementById('faqMenu'+which).className = 'active';   

        //set the last tag so we know which to remove next time
        last = which;
}

function toTheTop(){
        //reset the background image on the faq
		document.getElementById('faqDiv'+last).className = '';   

        //reset the background image on the faq menu
		document.getElementById('faqMenu'+last).className = '';      
        }
