﻿/** AviaSlider */
slideShowArray = [];
slideShowArray['feature_count'] = '8';
slideShowArray['slide_autorotate'] = '1';
slideShowArray['slide_duration'] = '6';
slideShowArray['slide_transition'] = '700';
slideShowArray['slider'] = 'aviaslider';
slideShowArray['box_height'] = '120';
slideShowArray['box_width'] = '120';
slideShowArray['box_transition'] = 'slide';
slideShowArray['box_transition_delay'] = '80';
slideShowArray['hidden'] = '';
slideShowArray['transition_direction_0'] = 'random';
slideShowArray['transition_direction_hidden'] = '2';
slideShowArray['transition_direction_final'] = 'random';
slideShowArray['transition_direction_1'] = '';

/** target link */
function targetBlank() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
for (var i=0; i < anchors.length; i++) {
	if (anchors[i].getAttribute("href") &&
	anchors[i].getAttribute("rel") == "bookmark" || anchors[i].getAttribute("rel") == "image" || anchors[i].getAttribute("rel") == "nofollow" || anchors[i].getAttribute("class") == "ext" || anchors[i].getAttribute("class") == "exts" || anchors[i].getAttribute("rel") == "upload") {
		anchors[i].target = "blank_";
		}
	}
}
window.onload = targetBlank;

/** CAPTCHA */
function ReNewCaptcha(captchaKey, captchaHeight)
{	
	if (document.images['captcha'] != undefined)
	{
		var antiCache = Math.floor(Math.random()*100000);
		document.images['captcha'].src = "/captcha.php?get_captcha=" + captchaKey + "&height=" + captchaHeight + "&anc=" + antiCache;
	}
}
function ReNewCaptchaById(imageId, captchaKey, captchaHeight)
{	
	var captchaObject = document.getElementById(imageId);

	if (null != captchaObject && undefined !== captchaObject)
	{
		var antiCache = Math.floor(Math.random()*100000);
		captchaObject.src = "/captcha.php?get_captcha=" + captchaKey + "&height=" + captchaHeight + "&anc=" + antiCache;
	}
}

