// blink
var b_timer = null; // blink timer
var b_on = true; // blink state
var blnkrs = null; // array of spans

function blink() {
	var tmp = document.getElementsByTagName("span");
	if (tmp) {
		blnkrs = new Array();
		var b_count = 0;
		for (var i = 0; i < tmp.length; ++i) {
			if (tmp[i].className == "blink") {
				blnkrs[b_count] = tmp[i];
				++b_count;
			}
		}
		// time in m.secs between blinks
		// 500 = 1/2 second
		blinkTimer(700);
	}
}

function blinkTimer(ival) {
	if (b_timer) {
		window.clearTimeout(b_timer);
		b_timer = null;
	}
	blinkIt();
	b_timer = window.setTimeout('blinkTimer(' + ival + ')', ival);
}

function blinkIt() {
	for (var i = 0; i < blnkrs.length; ++i) {
		if (b_on == true) {
			blnkrs[i].style.color = "#00F"
			// font-size = "18px" font-weight:bold; color:#00F; color:#999;
		}
		else {
			blnkrs[i].style.color = "#F00";
		}
	}
	b_on =!b_on;
}

// alert right click
am = "www.televital.com";
codeNS = navigator.appName=="Netscape"
codeIE = navigator.appName=="Microsoft Internet Explorer"
function noclick(e) {
if (codeNS && e.which > 1)
	 {alert(am)
	 return false} 
else if (codeIE && (event.button >1)) 
	 {alert(am)
	 return false;}
}
document.onmousedown = noclick;
document.oncontextmenu=new Function("return false")
if (document.layers) window.captureEvents(Event.MOUSEDOWN);

// disableSelection

function refreshPage(target){
	if (typeof target.onselectstart!="undefined") //IE route
		target.onselectstart=function(){return false}
	else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
		target.style.MozUserSelect="none"
	else //All other route (ie: Opera)
		target.onmousedown=function(){return false}
	target.style.cursor = "default"
}
