

var win=null;
function openfenetre(mypage,myname,w,h,scroll,pos){

    if(pos=="random")
    {
        LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
        TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
    }
    
    if(pos=="center"){
        LeftPosition=(screen.width)?(screen.width-w)/2:100;
        TopPosition=(screen.height)?(screen.height-h)/2:100;
    }
    else if((pos!="center" && pos!="random") || pos==null){
        LeftPosition=0;
        TopPosition=20
    }
    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);
}


var alpha=0; // Initial color value.
function fadetext(id,r,g,b){ 
if(alpha<101) {
	alpha+=4; // increase the alpha
	ar = Math.round(255-(((255-r)*alpha)/100));
	ag = Math.round(255-(((255-g)*alpha)/100));
	ab = Math.round(255-(((255-b)*alpha)/100));
	document.getElementById(id).style.color="rgb("+ar+","+ag+","+ab+")";
	//document.getElementById(id).style.filter =  "alpha(opacity="+alpha+")";
	setTimeout("fadetext('"+id+"',"+r+","+g+","+b+")",25); 
}
else
	alpha=0; //reset alpha value
}

var alpha2=0; // Initial color value.
function fadetext2(id,r,g,b){ 
if(alpha2<101) {
	alpha2+=4; // increase the alpha
	ar = Math.round(255-(((255-r)*alpha2)/100));
	ag = Math.round(255-(((255-g)*alpha2)/100));
	ab = Math.round(255-(((255-b)*alpha2)/100));
	document.getElementById(id).style.color="rgb("+ar+","+ag+","+ab+")";
	setTimeout("fadetext2('"+id+"',"+r+","+g+","+b+")",25); 
}
else
	alpha2=0; //reset alpha value
}

var alpha3=0; // Initial color value.
function fadetext3(id,r,g,b){ 
if(alpha3<101) {
	alpha3+=4; // increase the alpha
	ar = Math.round(255-(((255-r)*alpha3)/100));
	ag = Math.round(255-(((255-g)*alpha3)/100));
	ab = Math.round(255-(((255-b)*alpha3)/100));
	document.getElementById(id).style.color="rgb("+ar+","+ag+","+ab+")";
	setTimeout("fadetext3('"+id+"',"+r+","+g+","+b+")",25); 
}
else
	alpha3=0; //reset alpha value
}

var alpha4=0; // Initial color value.
function fadetext4(id,r,g,b){ 
if(alpha4<101) {
	alpha4+=4; // increase the alpha
	ar = Math.round(255-(((255-r)*alpha4)/100));
	ag = Math.round(255-(((255-g)*alpha4)/100));
	ab = Math.round(255-(((255-b)*alpha4)/100));
	document.getElementById(id).style.color="rgb("+ar+","+ag+","+ab+")";
	setTimeout("fadetext4('"+id+"',"+r+","+g+","+b+")",25); 
}
else
	alpha4=0; //reset alpha value
}


var alpha_img=0; // Initial color value.
function fadeimage(id){ 
if(alpha_img<101) {
	alpha_img+=4; // increase the alpha
    document.getElementById(id).filters.alpha.opacity=alpha_img;
	setTimeout("fadeimage('"+id+"')",25); 
}
else
	alpha_img=0; //reset alpha value
}


function xgo(url,value){
  document.location.href=url+''+value;
}


