//[OPENPIC]

function openpic(title,url,lo,me,re,sc,st,to,closingtime,w,h,t,l)
{
 
 if (t<0 || l<0){l=Math.round((screen.availWidth-w)/2);t=Math.round((screen.availHeight-h)/2)-25;}
 if (navigator.appName=='Netscape' && navigator.appVersion.substring(0,1)=='4')
 {
   aw=window.open('','','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
   aw.document.location=url;
   return false;
 }
 else
 {
   aw=window.open('','','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
   temp='<HTML><head><title>' + title + '<\/title><\/head><body style="margin:0;padding:0">';
   temp=temp+'<table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:100%;background: #FFFFFF">';
   temp=temp+'<tr><td width="100%">';
   temp=temp+'<p align="center"><a href="javascript:window.close();"><img src="' + url + '" border="0"><\/a>';
   
   temp=temp+'<\/td><\/tr>';
   temp=temp+'<\/table>';
   temp=temp+'<\/body><\/HTML>';
   aw.document.write(temp);
 }
 if (closingtime!=0) aw.setTimeout('window.close()',closingtime);
}

//[END]
//[TABLE-ROLLOVER]

var ns6=document.getElementById&&!document.all
var ie=document.all
var prev_color;

function rollover_on(e,clr,type,r_ex,c_ex,table)
{
el=ie?event.srcElement:e.target;
if(el.tagName=="TABLE") return;
while(el &&(typeof el.cellIndex=='undefined')){el=ie?el.parentElement:el=el.parentNode;}
if(el){
if(el.tagName=="TABLE") return;
if((ie)||(el.parentNode.cells[1] && el.parentNode.cells[1].cellIndex==1)) {ci=el.cellIndex;} else{myCells=el.parentNode.cells;for(j=0;j<myCells.length; j++) {if(el==myCells[j])ci=j;}}
if(type=='TC' || type=='TRTC') {if (ci>0 || c_ex =='') {table.ci=ci;fc=(r_ex=='')?0:1;for(x=fc;x<table.rows.length;x++) {prev_color=table.rows[x].cells[ci].style.backgroundColor;table.rows[x].cells[ci].style.backgroundColor=clr;}}}
el=ie?event.srcElement:e.target;
if(el.tagName=="TABLE") return;
while(el.tagName!='TR' && el.tagName!="HTML") el=ns6?el.parentNode:el.parentElement;
ri=el.rowIndex;
if(type=='TRTC' || type=='TR'){if(r_ex=='' || ri>0){table.ri=ri;fc=(c_ex=='')?0:1;for(x=fc;x<table.rows[ri].cells.length;x++) {if(clr!=table.rows[ri].cells[x].style.backgroundColor){prev_color=table.rows[ri].cells[x].style.backgroundColor;}table.rows[ri].cells[x].style.backgroundColor=clr;}}}
else if(type=='TD'){if((r_ex=='' || ri>0)&&(c_ex=='' || ci>0)){table.ri=ri;table.ci=ci;prev_color=table.rows[ri].cells[ci].style.backgroundColor;table.rows[ri].cells[ci].style.backgroundColor=clr;}}
}}

function rollover_off(e,clr,type,r_ex,c_ex,table)
{
if((type=='TC')||(type=='TRTC')){if((table.ci > 0)||(c_ex=='')){fc=(r_ex=='')?0:1; for(x=fc; x<table.rows.length;x++) table.rows[x].cells[table.ci].style.backgroundColor=prev_color;}}
if(type=='TRTC'||type=='TR'){if(table.rows[table.ri]){fc=(c_ex=='')?0:1;for(x=fc;x<table.rows[table.ri].cells.length;x++) table.rows[table.ri].cells[x].style.backgroundColor=prev_color;;}}
if(type=='TD'&&(table.rows[table.ri])){table.rows[table.ri].cells[table.ci].style.backgroundColor=prev_color;}
}

//[END]
//[OPENHTML]

function openhtml(url,lo,me,re,sc,st,to,w,h,t,l)
{
 if(t<0 || l<0){l=Math.round((screen.availWidth-w)/2);t=Math.round((screen.availHeight-h)/2)-25;}
 aw=window.open(url,'_blank','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
 aw.opener=self;aw.focus();return false;
}

//[END]
//[ADD_TO_FAV]

function addfav(url,title) {
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("opera")!= -1) {alert('Press CTRL-T to add this page to favorites')}
else if (document.all)   { window.external.AddFavorite(url,title) }
else if (window.sidebar) {window.sidebar.addPanel(title,url, "") }
}

//[END]
//[HDIV]

var hda = new Array();

function opacity(id,opacStart,opacEnd,millisec) {
var speed=Math.round(millisec/100);var timer=0;
if(opacStart>opacEnd)
{for(i=opacStart;i>=opacEnd;i--){setTimeout("changeOpac("+i+",'"+id+"')",(timer * speed));
  	timer++;
  }
 }
 else if(opacStart < opacEnd)
 {
  for(i = opacStart; i <= opacEnd; i++)
  {
  	setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
  	timer++;
  }
 }
}

function changeOpac(opacity, id)
{
 var object = document.getElementById(id).style;
 object.opacity = (opacity / 101);
 object.MozOpacity = (opacity / 101);
 object.KhtmlOpacity = (opacity / 100);
 object.filter = "alpha(opacity=" + opacity + ")";
}

function blenddiv(divid, millisec)
{
 var speed = Math.round(millisec / 100);
 var timer = 0;
 for(i = 0; i <= 100; i++)
 {setTimeout("changeOpac("+i+",'"+divid+"')",(timer*speed));timer++;
}
}

function stopEvent(e)
{
if(!e) var e=window.event;
e.cancelBubble=true;
if(e.stopPropagation) e.stopPropagation();
}

function initLogin(id,clclose)
{
hdp=document.getElementById('hdp_' + id);
if(!hdp) {return false;}
hda.push('hdp_'+id);
hdp.onmousedown=stopEvent;
document.onmousedown1=function(id) {document.getElementById('hdp_' + id).className=''}
if(clclose) document.onmousedown=function() {for(var i=0;i<hda.length;i++) document.getElementById(hda[i]).className='';}
document.getElementById('hdpc_'+id).onmousedown=function(e) {document.onmousedown1(id);return false;}
}

function showHdiv(id,ms) {
if(ms!=0){changeOpac(0,'hdp_'+id);}
hdp=document.getElementById('hdp_'+id);
hdp.className='popup';
if(ms!=0) {blenddiv('hdp_'+id,ms);}}

//[END]

