// JavaScript Document
function showImage (url, width, height) {
	window.open (urlPrefix + 'img.php?src=' + escape (url), '', 'width=' + width + ',height=' + height + ',location=0,status=0,menubar=0,resizable=0,toolbar=0,scrollbars=0');
}
function openDownload (url) {
	var width = 961;
	var height = 481;
	window.open (urlPrefix + 'en/links/?src=' + escape (url), '', 'width=' + width + ',height=' + height + ',location=0,status=0,menubar=0,resizable=1,toolbar=0,scrollbars=1');
}

function preloadImages () {
    if (document.images) {
        var imgFiles = preloadImages.arguments;
        if (document.preloadArray == null) {
            document.preloadArray = new Array ();
        }
        var i = document.preloadArray.length;
        with (document) {
            for (var j = 0; j < imgFiles.length; j++) {
                if (imgFiles[j].charAt(0) != "#") {
                    document.preloadArray[i] = new Image ();
                    document.preloadArray[i++].src = imgFiles[j];
                }
            }
        }
    }
}

/***********************************
*   http://javascripts.vbarsan.com/
*   This notice may not be removed 
***********************************/
//scroller's width
var swidth = 662;
//scroller's height
var sheight = 35;
//scroller's speed 
var sspeed = 4;
var restart = sspeed;
var rspeed = sspeed;
//scroller's pause 
var spause = 0;
var singletext = new Array ();

//-- begin: Scroller's Algorithm -->
var ii = 0;
var gekso = 0;
if (navigator.product && navigator.product == "Gecko") {
	var agt = navigator.userAgent.toLowerCase ();
	var rvStart = agt.indexOf ('rv:');
	var rvEnd = agt.indexOf (')', rvStart);
	var check15 = agt.substring (rvStart + 3, rvEnd);
	if (parseFloat (check15) < 1.8) gekso = 1;
}
var operbr = 0;
operbr = navigator.userAgent.toLowerCase ().indexOf ('opera');
function startNews () {
	if (document.getElementById) {
		ns6div = document.getElementById ('iens6div');
		if (operbr != -1) operdiv = document.getElementById ('operaslider');
		ns6div.style.left = swidth + "px";
		ns6div.innerHTML = singletext[0];
		sizeup = ns6div.offsetWidth;
		if (operbr != -1 && sizeup == swidth) {
			operdiv.innerHTML = singletext[0];
			sizeup = operdiv.offsetWidth;
		}
		ns6scroll ();
	}
	else {
		if (document.layers) {
			ns4layer = document.ns4div.document.ns4div1;
			ns4layer.left = swidth;
			ns4layer.document.write (singletext[0]);
			ns4layer.document.close ();
			sizeup = ns4layer.document.width;
			ns4scroll ();
		}
		else {
			if (document.all) {
				iediv = iens6div;
				iediv.style.pixelLeft = swidth + "px";
				iediv.innerHTML = singletext[0];
				sizeup = iediv.offsetWidth;
				iescroll ();
			}
		}
	}
}

function iescroll () {
	if (iediv.style.pixelLeft > 0 && iediv.style.pixelLeft <= sspeed) {
		iediv.style.pixelLeft = 0;
		setTimeout ("iescroll()", spause);
	}
	else {
		if (iediv.style.pixelLeft >= sizeup * -1) {
			iediv.style.pixelLeft -= sspeed + "px";
			setTimeout ("iescroll()", 100);
		}
		else {
			if (ii == singletext.length - 1) {
				ii = 0;
			}
			else {
				ii++;
			}
			iediv.style.pixelLeft = swidth + "px";
			iediv.innerHTML = singletext[ii];
			sizeup = iediv.offsetWidth;
			iescroll ();
		}
	}
}

function ns4scroll () {
	if (ns4layer.left > 0 && ns4layer.left <= sspeed) {
		ns4layer.left = 0;
		setTimeout ("ns4scroll()", spause);
	}
	else {
		if (ns4layer.left >= sizeup * -1) {
			ns4layer.left -= sspeed;
			setTimeout ("ns4scroll()", 100);
		}
		else {
			if (ii == singletext.length - 1) {
				ii = 0;
			}
			else {
				ii++;
			}
			ns4layer.left = swidth;
			ns4layer.document.write (singletext[ii]);
			ns4layer.document.close ();
			sizeup = ns4layer.document.width;
			ns4scroll ();
		}
	}
}

function ns6scroll () {
	if (parseInt (ns6div.style.left) > 0 && parseInt (ns6div.style.left) <= sspeed) {
		ns6div.style.left = 0;
		setTimeout ("ns6scroll()", spause);
	}
	else if (parseInt (ns6div.style.left) >= sizeup * -1) {
		ns6div.style.left = parseInt (ns6div.style.left) - sspeed + "px";
		setTimeout ("ns6scroll()", 100);
	}
	else {
		if (ii == singletext.length - 1) {
			ii = 0;
		}
		else {
			ii++;
		}
		ns6div.style.left = swidth + "px";
		ns6div.innerHTML = singletext[ii];
		sizeup = ns6div.offsetWidth;
		if (operbr != -1 && sizeup == swidth) {
			operdiv.innerHTML = singletext[ii];
			sizeup = operdiv.offsetWidth;
		}
		ns6scroll ();
	}
}
//-- end Algorithm -->

function embedNews () {
	if (document.layers) {
		document.write ('<ilayer id="ns4div" width="' + swidth + '" height="' + sheight + '><layer id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=restart"></layer></ilayer>');
	}
	if (document.getElementById || document.all) {
		document.write ('<div style="position: relative; overflow: hidden; width: ' + swidth + 'px; height:' + sheight + 'px; clip: rect(0 ' + swidth + 'px ' + sheight + 'px 0);" onmouseover="sspeed=0;" onmouseout="sspeed=restart">');
		if (gekso == 0 && operbr == -1) {
			document.write ('<div id="iens6div" style="position:absolute; height:' + sheight + 'px;"></div></div>');
		}
		else { 
			document.write ('<div id="iens6div" style="position:relative;height:' + sheight + 'px;"></div><div id="operaslider" style="position: absolute; visibility: hidden;"></div></div>');
		}
	}
}

