var win=null;
function popWindow(mypage,myname,w,h,scroll){

LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;

settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);

};

function init(){
var allA = document.getElementById('main').getElementsByTagName('a');
	for(var i=0;i<allA.length;i++){
		allA[i].onmouseover = function (){window.status = this.title;return true}
		allA[i].onmouseout = function (){window.status = '';return true}
	}
};

function clearOutterHtml(){
var objects = document.getElementById('main').getElementsByTagName("object");
	for(var i = 0; i < objects.length; i++){
		objects[i].outerHTML = objects[i].outerHTML;
	}
};

/*actives.asp*/

function showHere(x, y){
var aChild=document.getElementById('clientLeft').getElementsByTagName("a");

	for( var i=0; i<aChild.length; i++ ){
		aChild[i].style.backgroundColor = 'transparent';
		aChild[i].onmouseover = function(){this.style.backgroundColor = '#C7BCCC';}
		aChild[i].onmouseout = function(){this.style.backgroundColor = 'transparent';}
	}

	document.getElementById('activity'+x).style.backgroundColor = '#C7BCCC';
	document.getElementById('activity'+x).onmouseover = null;
	document.getElementById('activity'+x).onmouseout = null;

	var url="ajax_actives.asp?activityId="+x+"&activityType="+y;
	url=uncache(url);
	request.open("GET", url, true);
	request.onreadystatechange = showHere2;
	request.send(null);

	changeBanner('hidden'+x);
};

function showHere2(){
if(request.readyState==4 && request.status==200){
	document.getElementById('showHere').innerHTML = request.responseText;
}else{
	document.getElementById("showHere").innerHTML = "<div style='background:url(images/loader.gif) no-repeat center;display:block;width:355px;height:400px;'></div>";
}
};

function setOpacity(value){
	document.getElementById("showHere").style.opacity = value/10;
	document.getElementById("showHere").style.filter = 'alpha(opacity=' + value*10 + ')';
};

function changeBanner(foto){
	document.getElementById("banner").innerHTML = document.getElementById(foto).innerHTML;
};

function antispam(name,domain) {
	document.location = "mailto:" + name + "@" + domain;
};
/*end actives.asp*/

/**********************************************************************
	Opens news picture in new window
	*/
function showPic(picFile, picWidth, picHeight)
{
	var winWidth = parseInt(picWidth) + 36;
	var winHeight = parseInt(picHeight) + 30;
		
	window.open(picFile, '_blank', 'width=' + winWidth + ', scrollbars=no, height=' + winHeight + ', menubar=no, toolbar=no, status=no, resizable=yes, top=300, left=150')	
}
