//[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)
{
 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 = ''}
 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]
//[OPENPIC]

function openpic(title,url,lo,me,re,sc,st,to,closingtime,w,h,t,l)
{
 
 var h=parseInt(h)+25;

 if(t<0 || l<0){l=Math.round((screen.availWidth-w)/2);t=Math.round((screen.availHeight-h)/2)-25;}
 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"><table cellspacing="0" cellpadding="0" style="width:100%;height:100%;background:#FFFFFF"><tr><td width="100%"><p align="center"><a href="javascript:window.close();"><img width="'+w+'" border="0" src="'+url+'"><\/a>';
 
 temp+='<tr><td height="100%"><p align="center" style="color:#000000;font: 9px Verdana;">'+title+'<\/td><\/tr>';
 temp+='<tr><td height="100%"><p align="center" style="color:#000000;font: 9px Verdana;"><a href="javascript:window.close();">Close</a><\/td><\/tr>';

 temp+='<\/td><\/tr><\/table><\/body><\/HTML>';aw.document.write(temp);
 if (closingtime!=0) aw.setTimeout('window.close()',closingtime);
}

//[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]
