var go = true;
if (document.location.toString().indexOf('?refreshme=true')!=-1) {
SetCookie('refreshed','true');
go=false;
document.location=document.location.toString().split('?')[0];
}
if (GetCookie('refreshed')=='true' && go) {
SetCookie('refreshed','false');
document.location.reload();
}

var moretxtvalue='';
var nRec = 0;
var related = new Array();
var CurrItemId='addcook';
var ie = false;
var ns6 = false;
var ns = false;
var opera = false;

if (eval(document.layers)) { ns=true; }
else {
    if (eval(document.all)) { ie=true; if (navigator.userAgent.indexOf('Opera')!=-1) opera=true;}
        else {
            if (eval(document.getElementById)) { ns6=true;}
            }
    }


//finds and return <DIV> object by given name

function Layer(layerName) {
return (ns)?(document.layers[layerName]):((ns6)?(document.getElementById(layerName)):(document.all(layerName)));
}

function enlarge(url,imgw,imgh) {
var leftPos = 235;
var topPos = 233;
imgw=eval(imgw)+20; if (imgw > 800) imgw = 800;
imgh=eval(imgh)+30; if (imgh > 600) imgh = 600;

   var t = Math.random();
  t = t*1000000;
  t = Math.round(t); 
  
  var name = 'nm' + t;

window.open(url, name,'width='+imgw+',height='+imgh+',scrollbars=no,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}
	
function TellToFriend() {
var NewPop = new Object();
NewPop=window.open("http://site.beachtowelsplus.com/custom/ytellafriend.php?link="+pid.toLowerCase(),"tellafriend","HEIGHT=395,WIDTH=663,scrollbars=no,resizable=yes,top=50,left=50");
NewPop.window.focus();
}

function maillist(emailval) {
var NewP = new Object();
NewP=window.open('http://site.beachtowelsplus.com/custom/addemail.php?mail='+emailval,'popupemail','HEIGHT=150,WIDTH=520,scrollbars=yes,resizable=yes,top=50,left=50');
NewP.window.focus();
}

function retriveimages(arrname) {
return eval(arrname);
}
