
// Burada bulunan iki function rollover reklam girildiğinde reklam koordinatını bulmak için kullanılıyor (örneğin x:125  y:45 gibi)
function GetAbsoluteLeft(objectId) {
 var o = document.all.item(objectId);
 var oLeft = o.offsetLeft;
 while (o.offsetParent != null) {   
  oParent = o.offsetParent;    
  oLeft += oParent.offsetLeft;
  o = oParent;
 }
 oLeft = 205;
 return oLeft;
}

function Browser ()

{
            this.ie = this.netscape = this.mac = this.opera = 0;
            var s = navigator.userAgent.toLowerCase ();
            this.ie = (parseFloat (s.slice (s.indexOf ("msie") + 5)));
            this.netscape = (this.ie) ? (0) : Gecko (s.indexOf ("gecko/"), s);
            this.mac = (s.indexOf ("mac") > -1);
            this.opera = (parseFloat (s.slice (s.indexOf ("opera") + 6)));
            if (this.opera) this.ie = 0;
            this.screenHeight = screen.height;
            this.screenWidth = screen.width;
            this.colorDepth = (this.netscape >= 4) ? screen.pixelDepth : screen.colorDepth;
}


var browser = new Browser ();


function GetAbsoluteTop(objectId) {
 var o = document.all.item(objectId);
 var oTop = o.offsetTop;
 while (o.offsetParent != null) { 
  oParent = o.offsetParent;  
  oTop += oParent.offsetTop; 
  o = oParent;
 }
 return oTop;
}

function getextad(fbnid,furl,fwidth,fheight,fwmode,ftag,flink,ftype)
{
            document.write ("<OBJECT id=banner" + fbnid + " classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + fwidth + "\" height=\"" + fheight + "\" ");
              document.write ( " style=\"position:absolute; z-index:100; left:" + GetAbsoluteLeft("lgadvtd") + "; top:" + GetAbsoluteTop("lgadvtd") + "\">");

            if (ftag == "")
            {
                        document.write ("<param name=\"movie\" value=\"" + furl + "\">");
           }
            else
            {
                        if (furl.lastIndexOf("?") > 0)
                        {
                        document.write (" <PARAM name=\"movie\" value=\"" + furl + "&" + ftag + "=" + escape(flink) + "\">");
                        }
                       else
                       {
                       document.write (" <PARAM name=\"movie\" value=\"" + furl + "?" + ftag + "=" + escape(flink) + "\">");
                        }
            }
             document.write (" <param name=quality value=high>"
            + " <param name=wmode value=\"" + fwmode + "\">");

             if (ftag != "")
            {
                        if (furl.lastIndexOf("?") > 0)
                        {
                                   document.write (" <EMBED src=\"" + furl + "&" + ftag + "=" + escape(flink) +  "\"");
                        }
                       else
                        {
                                  document.write (" <EMBED src=\"" + furl + "?" + ftag + "=" + escape(flink) +  "\"");
                        }
            }
            else
            {
                       document.write (" <EMBED src=\"" + furl + "\"");
            }

             document.write (" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=" + fwmode + " width=\"" + fwidth + "\" height=\"" + fheight + "\"></EMBED>"

            + " </OBJECT>");
}
