//ADD_TO_FAV
function addfav(url,title) {if(url=='')url=location.href;if(title=='')title=document.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, "");}
//BLENDIMAGES
var ie=(navigator.appName.indexOf("Microsoft")!= -1);
function unblend(ci){co=ci;hv=setInterval("hl(co)",40);}
function blend(ci){clearInterval(hv);if(ie){ci.filters.alpha.opacity=20;}else if(ci.style.opacity) ci.style.opacity=0.2;}
function hl(ci){if(ie && ci.filters.alpha.opacity<100) ci.filters.alpha.opacity+=5;else if(!ie && ci.style.opacity<1) ci.style.opacity=parseFloat(ci.style.opacity)+0.05;else if(window.hv) clearInterval(hv);}
//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;
}
//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;}
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 class="rvps1"><a href="javascript:window.close();"><img width="'+w+'" src="'+url+'"><\/a>';
temp+='<\/td><\/tr><\/table><\/body><\/HTML>';aw.document.write(temp);
if (closingtime!=0) aw.setTimeout('window.close()',closingtime);
}
//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(type=='TR' && 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;}
}
//MULTIUPLOAD_JS
//function MultiSelector(list_target,max){this.list_target=list_target;this.count=0;this.id=0;if(max){this.max=max;} else{this.max=-1;};this.addElement=function(element){if(element.tagName=='INPUT' && element.type=='file'){element.name='file_'+this.id++;element.multi_selector=this;element.onchange=function(){var new_element=document.createElement('input');new_element.type='file';new_element.className='input1';this.parentNode.insertBefore(new_element,this);this.multi_selector.addElement(new_element);this.multi_selector.addListRow(this);this.style.position='absolute';this.style.left='-1000px';};if(this.max!= -1 && this.count >= this.max){element.disabled=true;};this.count++;this.current_element=element;} else{alert('Error: not a file input element');};};this.addListRow=function(element){var new_row=document.createElement('div');var new_row_button=document.createElement('input');new_row_button.type='button';new_row_button.value='Delete';new_row_button.className='input1';new_row.element=element;new_row_button.onclick=function(){this.parentNode.element.parentNode.removeChild(this.parentNode.element);this.parentNode.parentNode.removeChild(this.parentNode);this.parentNode.element.multi_selector.count--;this.parentNode.element.multi_selector.current_element.disabled=false;return false;};new_row.innerHTML=element.value+' ';new_row.appendChild(new_row_button);this.list_target.appendChild(new_row);};};
function MultiSelector(list_target){this.list_target=list_target;this.count=0;this.id=0;this.addElement=function(element){if(element.tagName=='INPUT' && element.type=='file'){element.name='file_'+this.id++;element.multi_selector=this;element.onchange=function(){var new_element=document.createElement('input');new_element.type='file';this.parentNode.insertBefore(new_element,this);this.multi_selector.addElement(new_element);this.multi_selector.addListRow(this);this.style.position='absolute';this.style.left='-1000px';};this.count++;this.current_element=element;} else{alert('Error');};};this.addListRow=function(element){var new_row=document.createElement('p');var new_row_button=document.createElement('input');new_row_button.type='button';new_row_button.value='Delete (' + element.value + ')';new_row_button.className='button medium';new_row.element=element;new_row_button.onclick=function(){this.parentNode.element.parentNode.removeChild(this.parentNode.element);this.parentNode.parentNode.removeChild(this.parentNode);this.parentNode.element.multi_selector.count--;this.parentNode.element.multi_selector.current_element.disabled=false;return false;};new_row.appendChild(new_row_button);this.list_target.appendChild(new_row);};};
//DROP_SCRIPT
var b_el=null;var tog=false;
function ToggleBody(e,r){if(tog&&b_el!=null&&b_el!=e){$("#"+b_el+"Body").slideUp();$("#"+b_el+"Up").attr("src",r+"images/expand.gif");};$("#"+e+"Body").slideToggle(function() {b_el=e;src=($(this).css("display")=="block")?"collapse":"expand";img=r+"images/"+src+".gif";$("#"+e+"Up").attr("src",img);});return false;}
//HDIV SCRIPTJQUERY
var hda='';var opa;
function initLogin(id,clclose){if($('#'+id).length==0) return false;$('#'+id).appendTo(document.body);$('#'+id).bind("mousedown",function(event) {event.stopPropagation();});if(clclose) $(document).bind("mousedown",function(e){if((hda!='')&&(e.pageX<($(window).width()-15)))hide_Hdiv(hda);});}
function show_Hdiv(id,ms,ha,op,po,pi,co){co=(co==null)?0:co;if(co==1){ck=$.cookie('hdiv');if(ck==null)ck='';if(ck.indexOf('|'+id+'|')==-1){$.cookie('hdiv',ck+'|'+id+'|',1);}else return;}
hda=id;opa=(op==null)?1:op;pos=(po==null)?0:po;pi=(pi==null)?0:pi;w=$(window).width();h=$(window).height();st=(pi==0)?$(window).scrollTop():0;dw=$('#'+id).width();dh=$('#'+id).height();if(pos==1)$('#'+id).css({left:((w-dw)/2),top:((h-dh)/2)+st});else if(pos==2)$('#'+id).css({left:5,top:5+st});else if(pos==3)$('#'+id).css({left:(w-dw-40),top:5+st});else if(pos==4)$('#'+id).css({left:5,top:(h-dh-45)+st});else if(pos==5)$('#'+id).css({left:(w-dw-40),top:(h-dh-45)+st});if(pi==1)$('#'+id).css({position:'fixed'});$('#'+id).fadeIn(ms);if(ha!=false)(ha!=null)?$('#'+id).draggable({handle:'handle'}):$('#'+id).draggable();}
function hide_Hdiv(id){hda='';$('#'+id).fadeOut(500)};
//bookmarks
function sClo(){$('.bkf').hide();}
function sCls(){if(typeof t!="undefined")clearTimeout(t);}
function sTim(){t=setTimeout(sClo,1000);}
$(document).ready(function(){$('.bkc').hover(function(){bkf=$(this).children('.bkf');h=$(this).height();w=$(this).width();bw=$(bkf).width();winPos=$(window).scrollTop()+$(window).height();elPos=$(this).offset().top+h+$(bkf).height();$(bkf).css('top',(winPos<elPos)?'-'+$(bkf).height()+'px':h);winPos=$(window).scrollLeft()+$(window).width();elPos=$(this).offset().left+bw;$(bkf).css('left',(winPos<elPos)?'-'+(bw-w)+'px':0);$(bkf).show();},function(){sTim()});$('.bkf').hover(function(){sCls()},function(){sTim()});});