var blk1  = "https://www.paypal.com/cgi-bin/webscr?cmd=_cart";
var blk1d = "&display=1";
var blk2  = "&business=luong%40ai.sri.com";
var winpar = "width=400,height=400,scrollbars," +
             "location,resizable,status";

function CallView () { // call the PayPal shopping cart view
  window.open (blk1 + blk1d + blk2, "paypal", winpar);
}


<!-- The JavaScript Source!! http://javascript.internet.com -->


function nbfavorites(){
var count = GetCookie('nbima')
if ((count == null) || (count < 1)) {
return ''
}
else {
 if (count == 1) {
  return 'View selection (1 image)'
 }
 else {
   return 'View selection (' + count + ' images)'
   }
 }
}

function iscart(){
var count = GetCookie('cart')
if(count == null) {
return ''
}
else {
return 'View cart'
   }
}

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}

function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function newWindowArgs(script,ref,src,url) {
var url_params= script + "?ref=" + ref + "&src=" + src + "&url=" + url ; 
imageWindow=window.open(url_params, 'ImageWindow','width=600,height=600,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,dependent=yes');
imageWindow.focus();
}

function newWindow(url) {
imageWindow=window.open(url , 'ImageWindow','width=500,height=500,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,dependent=yes');
imageWindow.focus();
}

function newWindowfull(url) {
imageWindow=window.open(url , 'ImageWindow','width=700,height=700,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,dependent=yes');
imageWindow.focus();
}

function Windowplus(url) {
	var left;
	var top;
	left = (screen.width - 600) / 2;
	top = (screen.height - 600) / 2 - 20;
	window.open(url, "","width=700,height=700,top=" + top + ",left=" + left + ",alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=0,resizable=yes,location=0,scrollbars=1,copyhistory=0");
}


function jumptopage(url) {
        selected=url.options[url.selectedIndex].value;
        window.location=selected;
}

function rating(url) {
        selected=url.options[url.selectedIndex].value;
	rateurl = "/scripts/rate_image.php" + selected;
	window.location=rateurl;
}

function sf(){document.f.q.focus();}

