var categorie = 'main';
var subcategorie = 'main';
var nume_site = 'www.danyelstudio.ro';
var ip = '38.107.179.221';
/*window.onunload = show_loading_time();
var from_time = new Date();
from_time = from_time.getTime();
var to_time = new Date();
to_time = to_time.getTime();
function  show_loading_time()
{
var secs = (to_time - from_time) /1000;
return secs;
}
 alert (+ show_loading_time); */
var self_page = self.location.href;
window.onload = startTimer;
window.onunload = endTimer;
var hour=0;
var min =0;
var sec =0;

function timer() {
 
  if (++sec>59) {
    if (++min>59) {
      hour++;
      min=0;
    }
   sec=0;
  }
  var _min=min>9?min:"0"+min;
  var _sec=sec>9?sec:"0"+sec;
  var _hour=hour>9?hour:"0"+hour;
   var _status = _hour+":"+_min+":"+_sec;
  return _status;
}

var myTimer=null;
var ONE_SECOND = 1000;
function startTimer() {
  endTimer();
  myTimer = setInterval("timer()",ONE_SECOND);
}
function endTimer() {
  if (myTimer != null) {
    clearInterval(myTimer);
	myTimer = null;
  }
}

// --> 
// make error proof
function lt_clicker(e) {
  try {
    lt_do_clicker(e);
  } catch (err) {
   alert("error "+err);
     return true;
  }
  return true;
}
function lt_do_clicker(e) {
// this grabs the link and redirects it to the php site.
  var lt_target = null;
  if (e != null) { 
     lt_target = e.target;
  } else {
     lt_target = window.event.srcElement;
  }
  // move on to our next site

  if (lt_target==null) return true; // can't track a link that doesn't exist

  if (lt_target.nodeName.toUpperCase() != 'A') return true; // don't want to track anything but links.
  if (lt_target.href==null) return true; // if we aren't going anywhere don't track
  var lt_href=lt_target.href;
  var lt_atext="";
  if (lt_target.innerText!=null) {
     lt_atext=lt_target.innerText;
  } else if (lt_target.innerHTML!=null) {
     lt_atext=lt_target.innerHTML;
  } else if (lt_target.text!=null) {
     lt_atext=lt_target.text;
  } else {
    return true; // can't track a link with no description
  }
  if(lt_href==null||lt_atext==null) return true; // once more with feeling.
  if(typeof(lt_href) != 'string') return true;  // not sure what else it could be, except an image.
  // see if the link is off the page
  var lt_host = document.location.hostname.toLowerCase();
  if (lt_host==null||lt_host=="") lt_host="hey hey";
  // if we want to track internal stuff, comment out this next line
//  if (lt_href.toLowerCase().indexOf(lt_host)>=0) return true; // don't track in and around site.
  // use the next line to avoid tracking links to some other URL
  if (lt_href.toLowerCase().indexOf("anotherURL")>0) return true;
  lt_href = escape(lt_href);
  lt_atext = escape(lt_atext);
  lt_from=escape(document.location);
  lt_referrer=escape(document.referrer);
  // we have a link. We have to mess with it.
   
   
function checkOS() {

  if(navigator.userAgent.indexOf('IRIX') != -1)

    { var OpSys = "Irix"; }

  else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('98') != -1))

    { var OpSys = "Windows 98"; }

  else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('95') != -1))

    { var OpSys = "Windows 95"; }
	
	else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('5.1') != -1))

    { var OpSys = "Windows XP"; }

else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('6.0') != -1))

    { var OpSys = "Windows Vista"; }

else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('5.2') != -1))

    { var OpSys = "Windows Server 2003"; }
	
else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('5.0') != -1))

    { var OpSys = "Windows 2000"; }
	
	else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('CE') != -1))

    { var OpSys = "Windows CE"; }
	
	else if((navigator.userAgent.indexOf('Win') != -1) &&

  (navigator.userAgent.indexOf('4.90') != -1))

    { var OpSys = "Windows ME"; }

  else if(navigator.appVersion.indexOf("16") !=-1)

    { var OpSys = "Windows 3.1"; }

  else if (navigator.appVersion.indexOf("NT") !=-1)

    { var OpSys= "Windows NT"; }  

else if(navigator.appVersion.indexOf("SunOS") !=-1)

    { var OpSys = "SunOS"; }

else if(navigator.appVersion.indexOf("Linux") !=-1)

    { var OpSys = "Linux"; }  
	
 else if(navigator.appVersion.indexOf("BeOS") !=-1)

    { var OpSys = "BeOS"; } 

 else if(navigator.appVersion.indexOf("OS/2") !=-1)

    { var OpSys = "OS/2"; } 
	
 else if(navigator.appVersion.indexOf("Unix") !=-1)

    { var OpSys = "Unix"; } 

else if(navigator.userAgent.indexOf('Mac') != -1)

    { var OpSys = "Macintosh"; }

else if(navigator.appName=="WebTV Internet Terminal")

    { var OpSys="WebTV"; }

else if(navigator.appVersion.indexOf("HP") !=-1)

    { var OpSys="HP-UX"; } 

else { var OpSys = "other"; }

  return OpSys;

}

function Broswer()
{
    var b = navigator.userAgent;
  if (b.match(/MSIE 4\.[0-9]{1,2}/i)) return "Microsoft Internet Explorer 4";
    if (b.match(/MSIE 5\.[0-9]{1,2}/i)) return "Microsoft Internet Explorer 5";
      if (b.match(/MSIE 6\.[0-9]{1,2}/i)) return "Microsoft Internet Explorer 6";
		if (b.match(/MSIE 7\.[0-9]{1,2}/i)) return "Microsoft Internet Explorer 7";
		 if (b.match(/iCab/i)) return "iCab";
		  if (b.match(/Opera/i)) return "Opera";
			if (b.match(/Konqueror/i)) return "Konqueror";
			  if (b.match(/safari/i)) return "Safari";
			  if (b.match(/libwww/i)) return "Lynx";
			  	if (b.match(/AOL/i)) return "AOL";
			  	 if (b.match(/Netscape/i)) return "Netscape";
					if (b.match(/Mozilla/i)) return "Mozilla";
  				 	 if (b.match(/Firefox/i)) return "Mozilla Firefox";
    				return ""+navigator.appname+"";
						}
 
			
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

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 SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie(name) {
  var exp = new Date();
  FixCookieDate (exp); 
  exp.setTime (exp.getTime() - 1);  // Istorie
  var cval = GetCookie (name);
  if (cval != null)
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var expdate = new Date();
var indexat_ro_monitor;
expdate.setTime(expdate.getTime() + (5*24*60*60*1000));
if (!(indexat_ro_monitor = GetCookie("indexat_ro_monitor")))
  indexat_ro_monitor = 0;
indexat_ro_monitor++;
SetCookie("indexat_ro_monitor",indexat_ro_monitor,expdate);


var sc_ro_index_isl_navigator = navigator.userAgent+' '+navigator.platform;
var sc_ro_index_isl_machine   = 0;

for (var i = 0; i < sc_ro_index_isl_navigator.length; i++)
  sc_ro_index_isl_machine = sc_ro_index_isl_machine^sc_ro_index_isl_navigator.charCodeAt(i);
//http://89.34.225.20/autentificare/statistici/x-statistics.php          http://trafic-analyzer.ro-index.eu/x-statistics.php
sc_ro_index_isl_req = "http://trafic-analyzer.ro-index.eu/x-statistics.php";
  var timp = new Date();
sc_ro_index_isl_req += "?machine="           +sc_ro_index_isl_machine;
sc_ro_index_isl_req += "&ip="                +ip;
sc_ro_index_isl_req += "&dom="               +escape(document.domain);
sc_ro_index_isl_req += "&lt_referrer="       +lt_referrer;
sc_ro_index_isl_req += "&browser="           +Broswer();
sc_ro_index_isl_req += "&limba="             +navigator.systemLanguage;
sc_ro_index_isl_req += "&OpSystem="          +checkOS();
sc_ro_index_isl_req += "&nume_site="         +nume_site;
sc_ro_index_isl_req += "&categorie="         +categorie;
sc_ro_index_isl_req += "&subcategorie="      +subcategorie;
sc_ro_index_isl_req += "&contor="            +indexat_ro_monitor;
sc_ro_index_isl_req += "&screenx="           +screen.width;
sc_ro_index_isl_req += "&screeny="           +screen.height;
sc_ro_index_isl_req += "&milisec="           +timer();
sc_ro_index_isl_req += "&lt_from="           +lt_from;
sc_ro_index_isl_req += "&self_page="         +self_page;
sc_ro_index_isl_req += "&to_href="           +lt_href;
sc_ro_index_isl_req += "&to_href_text="      +lt_atext;

sc_ro_index_isl_img     = new Image();
sc_ro_index_isl_img.src = sc_ro_index_isl_req; 
//alert (''+ indexat_ro_monitor);
///document.write ("<img src='statistici/x-statistics.php?browser=alina'>");
// the pause that refreshes
  var lt_start = new Date().getTime();
  var lt_stop = lt_start + 300;
  while(lt_start<lt_stop){
    lt_start = new Date().getTime(); // nice tight loop - it might be needed on slow systems
  }
  return true; // let link do his job 
}

// direct code that is executed immediately
   document.onclick=lt_clicker; // this directs links to our code

