/* -----------------------------------------------
   POWER PHLOGGER - v.2.2.5
   (c) 2000-2003 www.phpee.com
   contact: webmaster@phpee.com
  ------------------------------------------------ */

// ----------------------------------------------------------
// SETTINGS:
// here should be your username you received from www.example.com
// Do not edit this file manually!! Use the one you got in your
// confirmation-email or the one from PowerPhlogger's settings
// section.
   id_x = "bardas14";
// If you're using a frameset and are not getting correct 
// referrers, please uncomment the following line:
   // pp_frames = true;
// ----------------------------------------------------------


// define some defaults -------------------------------------
if(showme_x==null) var showme_x='n';
if(st_x==null)     var st_x='js';    // st means show-type


// get the user agent name ----------------------------------
v_x = navigator.appName;

// get the screen resolution --------------------------------
c_x=0;
if (v_x != "Netscape") c_x = screen.colorDepth;
else c_x = screen.pixelDepth;

// get the screen size --------------------------------------
s_x = screen.width+"x"+screen.height;

// get the document's title ---------------------------------
t_x = escape(document.title);

// get the document's referrer -------------------------------
var f_x = "";

// if pp_frames is true then try getting the framed referral (without error checking)
if (typeof(pp_frames) != "undefined")
	if (pp_frames)
		f_x = top.document.referrer;

// get the referral for non-multi-domained-framed sites using a Netscape browser
if ((f_x == "") || (f_x == "[unknown origin]") || (f_x == "unknown") || (f_x == "undefined"))
	if (document["parent"] != null) 
		if (parent["document"] != null) // ACCESS ERROR HERE!
			if (parent.document["referrer"] != null) 
				if (typeof(parent.document) == "object")
					f_x = parent.document.referrer; 

// get the referral for the current document if a framed referral wasn't found
if ((f_x == "") || (f_x == "[unknown origin]") || (f_x == "unknown") || (f_x == "undefined"))
	if (document["referrer"] != null) 
		f_x = document.referrer;

// convert all the unknown's into blank
if ((f_x == "") || (f_x == "[unknown origin]") || (f_x == "unknown") || (f_x == "undefined"))
	f_x = "";

// escape the referral
f_x = escape(f_x);

// getting data ready to send -------------------------------
r_x="?id="+id_x+"&referer="+f_x+"&r="+s_x+"&c="+c_x+"&showme="+showme_x+"&st="+st_x+"&title="+t_x;

// adding logid if called by st='phpjs'
if(jslogid_x==null) var jslogid_x = 0;
else r_x = r_x + "&jslogid="+jslogid_x;


if (st_x=='js') { // calling PowerPhlogger by JavaScript-tag
	if (v_x != "Microsoft Internet Explorer") {
		r_x = r_x+"&url="+document.URL; // $HTTP_REFERER problem with NS,...
	}
	document.open();
	document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.bardas-jsc.com/pphlogger/pphlogger.php"+r_x+"\"></script>");
	document.close();
} else { // calling PowerPhlogger by IMG-tag
	rand_x = Math.round(1000*Math.random());
	r_x = r_x+"&b="+rand_x;  //force the page to load the IMG
	document.open();
	document.write("<img src=\"http://www.bardas-jsc.com/pphlogger/pphlogger.php"+r_x+"\" alt=\"\" border=\"0\">");
	document.close();
}

