/* begin Page */

/* Generated with Artisteer version 2.3.0.25189, file checksum is 17AA2192. */

cssFix = function(){
var u = navigator.userAgent.toLowerCase(),
addClass = function(el, val){
	if(! el.className) {
		el.className = val;
	} else {
		var newCl = el.className;
		newCl+=(' '+val);
		el.className = newCl;
	}
},
is = function(t){return (u.indexOf(t)!=-1)};
addClass(document.getElementsByTagName('html')[0],[
(!(/opera|webtv/i.test(u))&&/msie (\d)/.test(u))?('ie ie'+RegExp.$1)
: is('firefox/2')?'gecko firefox2'
: is('firefox/3')?'gecko firefox3'
: is('gecko/')?'gecko'
: is('chrome/')?'chrome'
: is('opera/9')?'opera opera9':/opera (\d)/.test(u)?'opera opera'+RegExp.$1
: is('konqueror')?'konqueror'
: is('applewebkit/')?'webkit safari'
: is('mozilla/')?'gecko':'',
(is('x11')||is('linux'))?' linux'
: is('mac')?' mac'
: is('win')?' win':''
].join(' '));
}();

var artEventHelper = {
	'bind': function(obj, evt, fn) {
		if (obj.addEventListener)
			obj.addEventListener(evt, fn, false);
		else if (obj.attachEvent)
			obj.attachEvent('on' + evt, fn);
		else
			obj['on' + evt] = fn;
	}
};

var userAgent = navigator.userAgent.toLowerCase();
var browser = {
	version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
	safari: /webkit/.test(userAgent) && !/chrome/.test(userAgent),
	chrome: /chrome/.test(userAgent),
	opera: /opera/.test(userAgent),
	msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
	mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
};

var artLoadEvent = (function() {
	

	var list = [];

	var done = false;
	var ready = function() {
		if (done) return;
		done = true;
		for (var i = 0; i < list.length; i++)
			list[i]();
	};

	if (document.addEventListener && !browser.opera)
		document.addEventListener('DOMContentLoaded', ready, false);

	if (browser.msie && window == top) {
		(function() {
			try {
				document.documentElement.doScroll('left');
			} catch (e) {
				setTimeout(arguments.callee, 10);
				return;
			}
			ready();
		})();
	}

	if (browser.opera) {
		document.addEventListener('DOMContentLoaded', function() {
			for (var i = 0; i < document.styleSheets.length; i++) {
				if (document.styleSheets[i].disabled) {
					setTimeout(arguments.callee, 10);
					return;
				}
			}
			ready();
		}, false);
	}

	if (browser.safari || browser.chrome) {
		var numStyles;
		(function() {
			if (document.readyState != 'loaded' && document.readyState != 'complete') {
				setTimeout(arguments.callee, 10);
				return;
			}
			if ('undefined' == typeof numStyles) {
				numStyles = document.getElementsByTagName('style').length;
				var links = document.getElementsByTagName('link');
				for (var i = 0; i < links.length; i++) {
					numStyles += (links[i].getAttribute('rel') == 'stylesheet') ? 1 : 0;
				}
				if (document.styleSheets.length != numStyles) {
					setTimeout(arguments.callee, 0);
					return;
				}
			}
			ready();
		})();
	}
	artEventHelper.bind(window, 'load', ready);
	return ({
		add: function(f) {
			list.push(f);
		}
	})
})();

(function() {
	// fix ie blinking
	var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest && document.execCommand;
	try { if (!!m) { m('BackgroundImageCache', false, true); } }
	catch (oh) { };
})();

function xGetElementsByClassName(clsName, parentEle, tagName) {
	var elements = null;
	var found = [];
	var s = String.fromCharCode(92);
	var re = new RegExp('(?:^|' + s + 's+)' + clsName + '(?:$|' + s + 's+)');
	if (!parentEle) parentEle = document;
	if (!tagName) tagName = '*';
	elements = parentEle.getElementsByTagName(tagName);
	if (elements) {
		for (var i = 0; i < elements.length; ++i) {
			if (elements[i].className.search(re) != -1) {
				found[found.length] = elements[i];
			}
		}
	}
	return found;
}

var styleUrlCached = null;
function GetStyleUrl() {
    if (null == styleUrlCached) {
        var ns;
        styleUrlCached = '';
        ns = document.getElementsByTagName('link');
        for (var i = 0; i < ns.length; i++) {
            var l = ns[i];
            if (l.href && /style\.ie6\.css(\?.*)?$/.test(l.href)) {
                return styleUrlCached = l.href.replace(/style\.ie6\.css(\?.*)?$/, '');
            }
        }

        ns = document.getElementsByTagName('style');
        for (var i = 0; i < ns.length; i++) {
            var matches = new RegExp('import\\s+"([^"]+\\/)style\\.ie6\\.css"').exec(ns[i].innerHTML);
            if (null != matches && matches.length > 0)
                return styleUrlCached = matches[1];
        }
    }
    return styleUrlCached;
}

function fixPNG(element) {
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {
		var src;
		if (element.tagName == 'IMG') {
			if (/\.png$/.test(element.src)) {
				src = element.src;
				element.src = GetStyleUrl() + 'images/spacer.gif';
			}
		}
		else {
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
			if (src) {
				src = src[1];
				element.runtimeStyle.backgroundImage = 'none';
			}
		}
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";
	}
}

function artHasClass(el, cls) {
	return (el && el.className && (' ' + el.className + ' ').indexOf(' ' + cls + ' ') != -1);
}
/* end Page */

/* begin Menu */
function gTranslateFix() {
	var menus = xGetElementsByClassName("art-menu", document);
	for (var i = 0; i < menus.length; i++) {
		var menu = menus[i];
		var childs = menu.childNodes;
		var listItems = [];
		for (var j = 0; j < childs.length; j++) {
			var el = childs[j];
			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
		}
		for (var j = 0; j < listItems.length; j++) {
			var item = listItems[j];
			var a = null;
			var gspan = null;
			for (var p = 0; p < item.childNodes.length; p++) {
				var l = item.childNodes[p];
				if (!(l && l.tagName)) continue;
				if (String(l.tagName).toLowerCase() == "a") a = l;
				if (String(l.tagName).toLowerCase() == "span") gspan = l;
			}
			if (gspan && a) {
				var t = null;
				for (var k = 0; k < gspan.childNodes.length; k++) {
					var e = gspan.childNodes[k];
					if (!(e && e.tagName)) continue;
					if (String(e.tagName).toLowerCase() == "a" && e.firstChild) e = e.firstChild;
					if (e && e.className && e.className == 't') {
						t = e;
						if (t.firstChild && t.firstChild.tagName && String(t.firstChild.tagName).toLowerCase() == "a") {
							while (t.firstChild.firstChild) t.appendChild(t.firstChild.firstChild);
							t.removeChild(t.firstChild);
						}
						a.appendChild(t);
						break;
					}
				}
				gspan.parentNode.removeChild(gspan);
			}
		}
	}
}
artLoadEvent.add(gTranslateFix);

 function Insert_Separators() {
	var menus = xGetElementsByClassName("art-menu", document, "ul");
	for (var i = 0; i < menus.length; i++) {
		var menu = menus[i];
		var childs = menu.childNodes;
		var listItems = [];
		for (var j = 0; j < childs.length; j++) {
			var el = childs[j];
			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
		}
		for (var j = 0; j < listItems.length - 1; j++) {
			var item = listItems[j];
			var span = document.createElement('span');
			span.className = 'art-menu-separator';
			var li = document.createElement('li');
			li.appendChild(span);
			item.parentNode.insertBefore(li, item.nextSibling);

        }
        if (browser.msie) menu.style.position = "relative";
	}
	
}
artLoadEvent.add(Insert_Separators);

function Menu_IE6Setup() {
	var isIE6 = navigator.userAgent.toLowerCase().indexOf("msie") != -1
    && navigator.userAgent.toLowerCase().indexOf("msie 7") == -1;
	if (!isIE6) return;
	var aTmp2, i, j, oLI, aUL, aA;
	var aTmp = xGetElementsByClassName("art-menu", document, "ul");
	for (i = 0; i < aTmp.length; i++) {
		aTmp2 = aTmp[i].getElementsByTagName("li");
		for (j = 0; j < aTmp2.length; j++) {
			oLI = aTmp2[j];
			aUL = oLI.getElementsByTagName("ul");
			if (aUL && aUL.length) {
				oLI.UL = aUL[0];
				aA = oLI.getElementsByTagName("a");
				if (aA && aA.length)
					oLI.A = aA[0];
				oLI.onmouseenter = function() {
					this.className += " art-menuhover";
					this.UL.className += " art-menuhoverUL";
					if (this.A) this.A.className += " art-menuhoverA";
				};
				oLI.onmouseleave = function() {
					this.className = this.className.replace(/art-menuhover/, "");
					this.UL.className = this.UL.className.replace(/art-menuhoverUL/, "");
					if (this.A) this.A.className = this.A.className.replace(/art-menuhoverA/, "");
				};
			}
		}
	}
}
artLoadEvent.add(Menu_IE6Setup);
/* end Menu */

/* begin Button */


function artButtonsSetupJsHover(className) {
	var tags = ["input", "a", "button"];
	for (var j = 0; j < tags.length; j++){
		var buttons = xGetElementsByClassName(className, document, tags[j]);
		for (var i = 0; i < buttons.length; i++) {
			var button = buttons[i];
			if (!button.tagName || !button.parentNode) return;
			if (!artHasClass(button.parentNode, 'art-button-wrapper')) {
				if (!artHasClass(button, 'art-button')) button.className += ' art-button';
				var wrapper = document.createElement('span');
				wrapper.className = "art-button-wrapper";
				if (artHasClass(button, 'active')) wrapper.className += ' active';
				var spanL = document.createElement('span');
				spanL.className = "l";
				spanL.innerHTML = " ";
				wrapper.appendChild(spanL);
				var spanR = document.createElement('span');
				spanR.className = "r";
				spanR.innerHTML = " ";
				wrapper.appendChild(spanR);
				button.parentNode.insertBefore(wrapper, button);
				wrapper.appendChild(button);
			}
			artEventHelper.bind(button, 'mouseover', function(e) {
				e = e || window.event;
				wrapper = (e.target || e.srcElement).parentNode;
				wrapper.className += " hover";
			});
			artEventHelper.bind(button, 'mouseout', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				wrapper.className = wrapper.className.replace(/hover/, "");
				if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
			});
			artEventHelper.bind(button, 'mousedown', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				if (!artHasClass(button, 'active')) wrapper.className += " active";
			});
			artEventHelper.bind(button, 'mouseup', function(e) {
				e = e || window.event;
				button = e.target || e.srcElement;
				wrapper = button.parentNode;
				if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
			});
		}
	}
}

artLoadEvent.add(function() { artButtonsSetupJsHover("art-button"); });
/* end Button */

function haberlistesi() {
    hb = "/tr/HaberKayit.aspx";

    window.open(hb, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=300,height=250, left=' + popleft + ',top=' + poptop");

}
function genel(url) {
    var popwidth = 500;
    var popheight = 400;
    var popleft = (window.screen.width - popwidth) / 2;
    var poptop = (window.screen.height - popheight) / 2;
    window.open(url, '_blank', 'toolbar=no,status=yes,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,width=' + popwidth + ',height=' + popheight + ',left=' + popleft + ',top=' + poptop);
}

function fb() {
    var title = encodeURIComponent(document.title);
    var url = encodeURIComponent(document.location.href);
    var options = "width=626,height=436, titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1";
    var fb = '';

        url = document.location.href;
        url += url.indexOf('?') > -1 ? "&" : "?";
        url += "ref=facebookmypage";
        url = encodeURIComponent(url);
        fb = "http://www.facebook.com/sharer.php?u=" + url + "&title=" + title;



//    var url = encodeURIComponent(document.location.href);
//    var title = encodeURIComponent(document.title);
//    url = document.location.href;
//    url = encodeURIComponent(url);
//    fb = "http://www.facebook.com/sharer.php?u=" + url;

    window.open(fb, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=626, height=436");
}

function tw() {
    url = document.location.href;
    url = encodeURIComponent(url);
    var title = encodeURIComponent(document.title);
    tw = "http://twitter.com/home?status=" + title + " " + url;

    window.open(tw, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=800,height=700");

}
function ff() {
    url = document.location.href;
    url = encodeURIComponent(url);
    var title = encodeURIComponent(document.title);
    ff = "http://friendfeed.com/?url=" + url;

    window.open(ff, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=800,height=700");
}

function pg() {
    url = document.location.href;
    url = encodeURIComponent(url);
    var title = encodeURIComponent(document.title);
    pg = "/tr/epostaGonder.aspx?url=" + location.href;

    window.open(pg, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=570,height=380");
}

function bilgilendirme() {
    var popwidth = 300;
    var popheight = 250;
    var popleft = (window.screen.width - popwidth) / 2;
    var poptop = (window.screen.height - popheight) / 2;
    window.open('/tr/HaberKayit.aspx', '_blank', 'toolbar=no,status=yes,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,width=' + popwidth + ',height=' + popheight + ',left=' + popleft + ',top=' + poptop);
}

function HayirSlogan() {

    var Fonlar = new Array;
    Fonlar[0] = "images/HayirSloganlar/Slogan1.png";
    Fonlar[2] = "images/HayirSloganlar/Slogan2.png";
    Fonlar[3] = "images/HayirSloganlar/Slogan3.png";
    Fonlar[4] = "images/HayirSloganlar/Slogan4.png";
    Fonlar[5] = "images/HayirSloganlar/Slogan5.png";
    var x = Math.floor(Math.random() * 5); 
    return document.getElementById("art-page-background-glare-image").style.backgroundImage = "url("+ Fonlar[x] +")";
}



var interval = 3; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan1.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan2.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan3.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan4.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan5.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan6.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan7.png");
image_list[image_index++] = new imageItem("/images/HayirSloganlar/Slogan8.png");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
//  End -->

function gizle() {
    document.getElementById("message_Panel1").style.display = 'none';
}



/* Text and/or Image Crawler Script ©2009 John Davenport Scheuer
as first seen in http://www.dynamicdrive.com/forums/
username: jscheuer1 - This Notice Must Remain for Legal Use
*/

///////////////// DO NOT EDIT /////////////////

function marqueeInit(config) {
    if (!document.createElement) return;
    marqueeInit.ar.push(config);
    marqueeInit.run(config.uniqueid);
}

(function() {

    if (!document.createElement) return;

    marqueeInit.ar = [];

    document.write('<style type="text/css">.marquee{overflow:hidden;visibility:hidden;}' +
 '#marq_kill_marg_bord{border:none!important;margin:0!important;}<\/style>');
    var c = 0, tTRE = [new RegExp('^\\s*$'), new RegExp('^\\s*'), new RegExp('\\s*$')],
 req1 = { 'position': 'relative', 'overflow': 'hidden' }, defaultconfig = {
     style: { //default style object for marquee containers without configured style
         'margin': '0 auto'
     },
     direction: 'left',
     inc: 2, //default speed - pixel increment for each iteration of a marquee's movement
     mouse: 'pause' //default mouseover behavior ('pause' 'cursor driven' or false)
 }, dash, ie = false, oldie = 0, ie5 = false, iever = 0;

    /*@cc_on@*/
    /*@if(@_jscript_version >= 5)
    ie = true;
    try { document.documentMode = 2000 } catch (e) { };
    iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (\d+\.\d+).*$/, '$1'));
    if (iever < 6)
        oldie = 1;
    if (iever < 5.5) {
        Array.prototype.push = function(el) { this[this.length] = el; };
        ie5 = true;
        dash = new RegExp('(-(.))');
        String.prototype.encamel = function(s, m) {
            s = this;
            while ((m = s.match(dash)))
                s = s.replace(m[1], m[2].toUpperCase());
            return s;
        };
    }
    @end@*/

    if (!ie5) {
        dash = new RegExp('-(.)', 'g');
        function toHump(a, b) { return b.toUpperCase(); };
        String.prototype.encamel = function() { return this.replace(dash, toHump); };
    }

    if (ie && iever < 8) {
        marqueeInit.table = [];
        window.attachEvent('onload', function() {
            marqueeInit.OK = true;
            for (var i = 0; i < marqueeInit.table.length; ++i)
                marqueeInit.run(marqueeInit.table[i]);
        });
    }

    function intable(el) {
        while ((el = el.parentNode))
            if (el.tagName && el.tagName.toLowerCase() === 'table')
            return true;
        return false;
    };

    marqueeInit.run = function(id) {
        if (ie && !marqueeInit.OK && iever < 8 && intable(document.getElementById(id))) {
            marqueeInit.table.push(id);
            return;
        }
        if (!document.getElementById(id))
            setTimeout(function() { marqueeInit.run(id); }, 300);
        else
            new Marq(c++, document.getElementById(id));
    }

    function trimTags(tag) {
        var r = [], i = 0, e;
        while ((e = tag.firstChild) && e.nodeType == 3 && tTRE[0].test(e.nodeValue))
            tag.removeChild(e);
        while ((e = tag.lastChild) && e.nodeType == 3 && tTRE[0].test(e.nodeValue))
            tag.removeChild(e);
        if ((e = tag.firstChild) && e.nodeType == 3)
            e.nodeValue = e.nodeValue.replace(tTRE[1], '');
        if ((e = tag.lastChild) && e.nodeType == 3)
            e.nodeValue = e.nodeValue.replace(tTRE[2], '');
        while ((e = tag.firstChild))
            r[i++] = tag.removeChild(e);
        return r;
    }

    function Marq(c, tag) {
        var p, u, s, a, ims, ic, i, marqContent, cObj = this;
        this.mq = marqueeInit.ar[c];
        for (p in defaultconfig)
            if ((this.mq.hasOwnProperty && !this.mq.hasOwnProperty(p)) || (!this.mq.hasOwnProperty && !this.mq[p]))
            this.mq[p] = defaultconfig[p];
        this.mq.style.width = !this.mq.style.width || isNaN(parseInt(this.mq.style.width)) ? '100%' : this.mq.style.width;
        if (!tag.getElementsByTagName('img')[0])
            this.mq.style.height = !this.mq.style.height || isNaN(parseInt(this.mq.style.height)) ? tag.offsetHeight + 3 + 'px' : this.mq.style.height;
        else
            this.mq.style.height = !this.mq.style.height || isNaN(parseInt(this.mq.style.height)) ? 'auto' : this.mq.style.height;
        u = this.mq.style.width.split(/\d/);
        this.cw = this.mq.style.width ? [parseInt(this.mq.style.width), u[u.length - 1]] : ['a'];
        marqContent = trimTags(tag);
        tag.className = tag.id = '';
        tag.removeAttribute('class', 0);
        tag.removeAttribute('id', 0);
        if (ie)
            tag.removeAttribute('className', 0);
        tag.appendChild(tag.cloneNode(false));
        tag.className = ['marquee', c].join('');
        tag.style.overflow = 'hidden';
        this.c = tag.firstChild;
        this.c.appendChild(this.c.cloneNode(false));
        this.c.style.visibility = 'hidden';
        a = [[req1, this.c.style], [this.mq.style, this.c.style]];
        for (i = a.length - 1; i > -1; --i)
            for (p in a[i][0])
            if ((a[i][0].hasOwnProperty && a[i][0].hasOwnProperty(p)) || (!a[i][0].hasOwnProperty))
            a[i][1][p.encamel()] = a[i][0][p];
        this.m = this.c.firstChild;
        if (this.mq.mouse == 'pause') {
            this.c.onmouseover = function() { cObj.mq.stopped = true; };
            this.c.onmouseout = function() { cObj.mq.stopped = false; };
        }
        this.m.style.position = 'absolute';
        this.m.style.left = '-10000000px';
        this.m.style.whiteSpace = 'nowrap';
        if (ie5) this.c.firstChild.appendChild((this.m = document.createElement('nobr')));
        if (!this.mq.noAddedSpace)
            this.m.appendChild(document.createTextNode('\xa0'));
        for (i = 0; marqContent[i]; ++i)
            this.m.appendChild(marqContent[i]);
        if (ie5) this.m = this.c.firstChild;
        ims = this.m.getElementsByTagName('img');
        if (ims.length) {
            for (ic = 0, i = 0; i < ims.length; ++i) {
                ims[i].style.display = 'inline';
                ims[i].style.verticalAlign = ims[i].style.verticalAlign || 'top';
                if (typeof ims[i].complete == 'boolean' && ims[i].complete)
                    ic++;
                else {
                    ims[i].onload = function() {
                        if (++ic == ims.length)
                            cObj.setup();
                    };
                }
                if (ic == ims.length)
                    this.setup();
            }
        }
        else this.setup()
    }

    Marq.prototype.setup = function() {
        if (this.mq.setup) return;
        this.mq.setup = this;
        var s, cObj = this;
        if (this.c.style.height === 'auto')
            this.c.style.height = this.m.offsetHeight + 4 + 'px';
        this.c.appendChild(this.m.cloneNode(true));
        this.m = [this.m, this.m.nextSibling];
        if (this.mq.mouse == 'cursor driven') {
            this.r = this.mq.neutral || 16;
            this.sinc = this.mq.inc;
            this.c.onmousemove = function(e) { cObj.mq.stopped = false; cObj.directspeed(e) };
            if (this.mq.moveatleast) {
                this.mq.inc = this.mq.moveatleast;
                if (this.mq.savedirection) {
                    if (this.mq.savedirection == 'reverse') {
                        this.c.onmouseout = function(e) {
                            if (cObj.contains(e)) return;
                            cObj.mq.inc = cObj.mq.moveatleast;
                            cObj.mq.direction = cObj.mq.direction == 'right' ? 'left' : 'right';
                        };
                    } else {
                        this.mq.savedirection = this.mq.direction;
                        this.c.onmouseout = function(e) {
                            if (cObj.contains(e)) return;
                            cObj.mq.inc = cObj.mq.moveatleast;
                            cObj.mq.direction = cObj.mq.savedirection;
                        };
                    }
                } else
                    this.c.onmouseout = function(e) { if (!cObj.contains(e)) cObj.mq.inc = cObj.mq.moveatleast; };
            }
            else
                this.c.onmouseout = function(e) { if (!cObj.contains(e)) cObj.slowdeath(); };
        }
        this.w = this.m[0].offsetWidth;
        this.m[0].style.left = 0;
        this.c.id = 'marq_kill_marg_bord';
        this.m[0].style.top = this.m[1].style.top = Math.floor((this.c.offsetHeight - this.m[0].offsetHeight) / 2 - oldie) + 'px';
        this.c.id = '';
        this.c.removeAttribute('id', 0);
        this.m[1].style.left = this.w + 'px';
        s = this.mq.moveatleast ? Math.max(this.mq.moveatleast, this.sinc) : (this.sinc || this.mq.inc);
        while (this.c.offsetWidth > this.w - s)
            this.c.style.width = isNaN(this.cw[0]) ? this.w - s + 'px' : --this.cw[0] + this.cw[1];
        this.c.style.visibility = 'visible';
        this.runit();
    }

    Marq.prototype.slowdeath = function() {
        var cObj = this;
        if (this.mq.inc) {
            this.mq.inc -= 1;
            this.timer = setTimeout(function() { cObj.slowdeath(); }, 100);
        }
    }

    Marq.prototype.runit = function() {
        var cObj = this, d = this.mq.direction == 'right' ? 1 : -1;
        if (this.mq.stopped || this.mq.stopMarquee) {
            setTimeout(function() { cObj.runit(); }, 300);
            return;
        }
        if (this.mq.mouse != 'cursor driven')
            this.mq.inc = Math.max(1, this.mq.inc);
        if (d * parseInt(this.m[0].style.left) >= this.w)
            this.m[0].style.left = parseInt(this.m[1].style.left) - d * this.w + 'px';
        if (d * parseInt(this.m[1].style.left) >= this.w)
            this.m[1].style.left = parseInt(this.m[0].style.left) - d * this.w + 'px';
        this.m[0].style.left = parseInt(this.m[0].style.left) + d * this.mq.inc + 'px';
        this.m[1].style.left = parseInt(this.m[1].style.left) + d * this.mq.inc + 'px';
        setTimeout(function() { cObj.runit(); }, 30 + (this.mq.addDelay || 0));
    }

    Marq.prototype.directspeed = function(e) {
        e = e || window.event;
        if (this.timer) clearTimeout(this.timer);
        var c = this.c, w = c.offsetWidth, l = c.offsetLeft, mp = (typeof e.pageX == 'number' ?
   e.pageX : e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft) - l,
  lb = (w - this.r) / 2, rb = (w + this.r) / 2;
        while ((c = c.offsetParent)) mp -= c.offsetLeft;
        this.mq.direction = mp > rb ? 'left' : 'right';
        this.mq.inc = Math.round((mp > rb ? (mp - rb) : mp < lb ? (lb - mp) : 0) / lb * this.sinc);
    }

    Marq.prototype.contains = function(e) {
        if (e && e.relatedTarget) {
            var c = e.relatedTarget; if (c == this.c) return true;
            while ((c = c.parentNode)) if (c == this.c) return true;
        }
        return false;
    }

    function resize() {
        for (var s, m, i = 0; i < marqueeInit.ar.length; ++i) {
            if (marqueeInit.ar[i] && marqueeInit.ar[i].setup) {
                m = marqueeInit.ar[i].setup;
                s = m.mq.moveatleast ? Math.max(m.mq.moveatleast, m.sinc) : (m.sinc || m.mq.inc);
                m.c.style.width = m.mq.style.width;
                m.cw[0] = m.cw.length > 1 ? parseInt(m.mq.style.width) : 'a';
                while (m.c.offsetWidth > m.w - s)
                    m.c.style.width = isNaN(m.cw[0]) ? m.w - s + 'px' : --m.cw[0] + m.cw[1];
            }
        }
    }

    if (window.addEventListener)
        window.addEventListener('resize', resize, false);
    else if (window.attachEvent)
        window.attachEvent('onresize', resize);

})();
