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;}
            }
    }

/////////////////////////////////////////////////
//
//	Image Preloader & RollOvers
//
	
function preloadImages(){
	var d = document;  if(!d.pics) d.pics = [];
	for(var i = 0, a = preloadImages.arguments; i < a.length; i++)
		(d.pics[d.pics.length] = new Image()).src = a[i];
}

function rollover(id,src,css){
	Layer(id+'_image').childNodes[0].src = src;
	Layer(id+'_anchor').className = css;
}	
	
// Hide and Show menu
function lnavhovers(id, cls){
	TD = id.parentNode;
	TD.className = cls;
}

//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 = (screen.availWidth-900) / 2;
var topPos = (screen.availHeight-600) / 2;
imgw=eval(imgw)+20; if (imgw > 800) imgw = 800;
imgh=eval(imgh)+30; if (imgh > 600) imgh = 600;
window.open(url, 'EnlargePicture','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://p.hostingprod.com/@atlasphones.com/custom/ytellafriend.php?link="+pid.toLowerCase(),"tellafriend","HEIGHT=345,WIDTH=520,scrollbars=yes,resizable=yes,top=50,left=50");
NewPop.window.focus();
}

function maillist(emailval) {
var NewP = new Object();
NewP=window.open('http://p.hostingprod.com/@atlasphones.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);
}

function renderComments() {
str='';
if (nRec) {
	for (var i=0;i<mesRecords.length;i++) {
		values=mesRecords[i].split('|');
		str+="<tr valign=top><td width=\"15%\" class=\"td15\"><b>"+values[1]+"</b><br>("+values[0]+")</td><td width=\"70%\" class=\"td15\"><div class=\"col6\">"+values[2]+"</div></td><td width=\"15%\" align=\"right\" class=\"td15\"><div><img src=\"http://p.hostingprod.com/@atlasphones.com/i/stars/stars"+values[3]+"0.gif\" border=\"0\" vspace=7/></div></td></tr></tr></td></tr>";
		}
	}
document.write(str);
}

function cl(obj){
	obj.style.backgroundColor = 'url(http://p.hostingprod.com/@atlasphones.com/i/nav-bg2.gif)';
}
function c2(obj){
	obj.style.backgroundColor = 'url(http://p.hostingprod.com/@atlasphones.com/i/nav-bg1.gif)';
}
