var browser = new Browser();
var oter = new Array;
oter[1]=10;
var tourl="";
function valelogo(){
var browser=navigator.appName;
if (browser == "Microsoft Internet Explorer")
{
 kx = kx;

alla.style.top = -5;

  var ky1 = kx/12;
}
else
{
 kx = kx-30;
 var ky1 = kx/13;
}

var ky = Math.floor(ky1);
var neoal = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+kx+'" height="'+ky+'" id="http://www.9dir.com/logo_9dir_2" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.9dir.com/logo_9dir_2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://www.9dir.com/logo_9dir_2.swf" quality="high" bgcolor="#000000" width="'+kx+'" height="'+ky+'" name="http://www.9dir.com/logo_9dir_2" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
document.getElementById('alla').innerHTML = neoal;

}
function furl() {
var aa=ypob.URL.value;
var aalen = aa.length;
var tstaa = aa.substring(0,7);
if (tstaa == "http://")
	{
	var aalas = aa.substring(7,aalen);	
	}
else
	{
	var aalas = aa;
	}

var aalasp = aalas.split("/");
var aalaspe = aalasp[0].split(" ");

	tourl = "http://"+aalasp[0];
if (aalaspe[0] == "")
	{tourl = "";}

var aaa="http://www.9dir.com/55.php?link="+aa;
parent.fmap.location=aaa;
}
function ctitle(a,b)
{
ypob.TITLE.value=a;
ypob.DESCRIPTION.value=b;
cdesc();
}
function recprf()
{

if (tourl == "")
	{
	alert("Please first fill the field with the url of the site");
	ypob.RECPR_URL.value = "";
	}
else 
	{
	var tourllen = tourl.length;
	var recpraa = ypob.RECPR_URL.value;
	var urlbeta = recpraa.substring(0,tourllen);
	if (urlbeta == tourl)
		{
		}
		else
		{
		ypob.RECPR_URL.value = tourl;
		}	

	}

}
function pamemazi() {

var zz=ypob.DESCRIPTION.value;
var elmh=zz.match(">");
var elmh1=elmh.length;
if (elmh1 > 0)
{
alert("Character > isn't acceptable in 9dir due to inappropriate use it has been done in the past");
ypob.DESCRIPTION.value="";
ypob.DLE.value=250;
}
var zelmh=zz.match("<");
var zelmh1=elmh.length;
if (zelmh1 > 0)
{
alert("Character < isn't acceptable in 9dir due to inappropriate use it has been done in the past");
ypob.DESCRIPTION.value="";
ypob.DLE.value=250;
}
}


function cdesc()
{
var zz=ypob.DESCRIPTION.value;
var zzz=zz.length;

if (zzz > 250)
{
var vv=zz.substring(0,250)
ypob.DESCRIPTION.value=vv;
ypob.DLE.value=0;
}
else
{
var cc=250-zzz;
ypob.DLE.value=cc;
}

pamemazi();
}
function Browser() {
  var ua, s, i;
  this.isIE    = false;
  this.isNS    = false;
  this.version = null;
  ua = navigator.userAgent;
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}



function konstantinos(id)
{
if (document.all)
	{
	return document.all[id].style;
	}
	else if(document.layers)
	{
	return document.layers[id];
	}
	else if(document.getElementById && document.getElementById(id) != null)
	{
	 return document.getElementById(id).style;
	}
}

function probingos() {
 if (browser.isNS) { var to1 = document.height+100; }
  if (browser.isIE) { var to1 =document.body.scrollHeight+100; }
var ky=document.body.clientHeight;
if (to1 > ky) {var a=to1; } else {var a=ky;}
var s=document.body.clientWidth;
var asd=a/2;
var b=Math.floor(asd);
var t="pam1";
var oter=konstantinos(t);
oter.width = s;
oter.height = b;
var t="pam2";
var oter=konstantinos(t);
var tp=a-b;
oter.width = s;
oter.height = tp;
oter.top = b;
}

function epipame(to) {
var a2=to;
var a3=a2.split("http://");
var a4=a3[1];
var a5=a4.split("www.");
var a6=a5[1];
if (typeof a6=="undefined") { var a6=a5[0]; }
var a7=a6.split("/");
var a8=a7[0];
alert("Your link "+to+" submitted and awaiting approval. Do not to forget your Domains Popularity in 9dir home page.");
}

function recip(an,poio){
if (an == "")
{
document.write('<br>');
}
else
{
var recipimg='http://www.9dir.com/rc/images/thumbs/'+poio+'.jpg';
document.write('<img src='+recipimg+'></td><td><br><b>');
}
}

function recimg(theurl){
var sparti="Your site: "+theurl+" has been successfully added for approval by 9dir Admin Center. ";
alert(sparti);
window.location = "http://www.9dir.com"
}

function ftimg(poio){
if (poio == "kx")
{
var ewer=1;
}
else
{
var recipimg='http://www.9dir.com/ft/index.php?kx='+poio;
document.write('<IFRAME name="katalogos" SRC="'+recipimg+'" WIDTH="100%" HEIGHT="200" SCROLLING=no FRAMEBORDER=0 ></IFRAME>');
}
}
