function browser_identificator() {
var x;
var browser;
var version; 
var screen_x; 
var screen_y;
var isPlugins = '';
	version = "0";
	isDOM		= document.getElementById?true:false;
	isJava      = navigator.javaEnabled();
	isStrict    = document.compatMode=='CSS1Compat';
	if(window.opera && isDOM) {
		browser = "Opera";
		version = "5";
		if(window.print)
			version = "6";
		if((navigator.userAgent.indexOf("Opera 7") >= 0 || navigator.userAgent.indexOf("Opera/7") >= 0))
			version= "7";
		
	}
	if(!(window.opera && isDOM) && document.all && document.all.item) {
		browser = 'MSIE';
		version = navigator.userAgent.replace(/^.*MSIE.(\d+).*$/, "$1");
	}
	if(navigator.appName=="Netscape" && !isDOM) {
		browser = 'NN';
		version = navigator.userAgent.replace(/^.*Mozilla.(\d+).*$/, "$1");
		if(version != '')
			version = "4";
	}
	if(navigator.appName=="Netscape" && isDOM) {
		if(navigator.userAgent.indexOf("Safari") >= 0) {
			browser = 'Safari';
			version = navigator.userAgent.replace(/^.*Safari.(\d+).*$/, "$1");
		} else {
			browser = 'Mozilla';
			version = navigator.userAgent.replace(/^.*Mozilla.(\d+).*$/, "$1");
		}
	}
	for(x = 0; x < navigator.plugins.length; x++)
		isPlugins += (isPlugins == ''?"":"|")+navigator.plugins[x].name.replace(/\s/g, "+").replace(/&/, " ");
	isPlatform = navigator.platform;
	isCookie	= ((browser == 'NN' && version == '4')?(document.cookie != ''):navigator.cookieEnabled);
	screen_x = screen.width;
	screen_y = screen.height;
	return (isDOM?"Y":"N")+(isStrict?"Y":"N")+(isJava?"Y":"N")+"|"+browser+"|"+version+"|"+isPlatform+"|"+(isCookie?"Y":"N")+"|"+screen_x+"|"+screen_y+"|"+isPlugins;
}

function popWin(url,name,params){
	var win = window.open(url,name,params);
	win.focus();
}

function showTab(tab){
	var tabs = new Array("detailed_images","upselling_products","recommended_products","customer_reviews","product_description");
	for(i=0; i < tabs.length; i++){
		var tmpTab = document.getElementById(tabs[i]);
		var tabTab = document.getElementById(tabs[i] + "_tab");
		if(tmpTab && tabTab){
			if(tabs[i] == tab){
				tmpTab.style.display = "block";
				tabTab.className = "active_details_tab";
			}else{
				tmpTab.style.display = "none";
				tabTab.className = "details_tab";
			}
		}
		tmpTab = "";
	}
}

function visibleBox(id,skipOpenClose)
{
  elm1 = document.getElementById("open"+id);
  elm2 = document.getElementById("close"+id);
  elm3 = document.getElementById("box"+id);
  if (skipOpenClose) 
  {
		if (elm3.style.display == "") {
			 elm3.style.display = "none";
		} else {
			 elm3.style.display = "";
		}
  }
  else
  {
		if (elm1.style.display == "") {
			 elm1.style.display = "none";
			 elm2.style.display = "";
			 elm3.style.display = "none";
		} else {
			 elm1.style.display = "";
			 elm2.style.display = "none";
			 elm3.style.display = "";
		}
  }
}

function addToBookmarks (url, title) {
	//MattF
	//alert (url + " " + title);
	
	if (document.all){
		window.external.AddFavorite (url, title);
	}
	else if (window.sidebar){
		window.sidebar.addPanel (title, url, "");
	}
	else if (window.opera && window.print){
		return true;
	}
	else {
		alert ("Unknown Browser! Press use your browser menus to add a bookmark to \n\n" + title + "\n" + url);
	}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
