//jornades.js ----- Versió 27-10-05 COBDC 10es JORNADES DE DOCUMENTACIÓ -----

//-----No error-----------------

function errorsuppressor(){
return true
}
window.onerror=errorsuppressor;

function escriu(mail,domini) {
var name = mail;
var host = domini;
document.write("<a class='content' href=" + "mail" + "to:" + name + "@" + host +">" + name + "@" + host + "</a>")
}

function faltendies() {
  var day	=	25 // Day
  var month	=	5 // Month
  var year	=	2006 //Year
  var event	=	" dies per a les Jornades"
  var daystocount=new Date(year, month -1, day)
  today=new Date()
  if (today.getMonth()==month && today.getDate()>day)
  daystocount.setFullYear(daystocount.getFullYear())
  var oneday=1000*60*60*24
  var write = (Math.ceil((daystocount.getTime()-today.getTime())/(oneday)))
  document.write('Falten <span class="txtvermell">'+ write +'</span>' + event)
}

function posadata(){
data = new Date();
Mes = data.getMonth();
mesos = new Array ("de gener","de febrer","de mar&ccedil;","d'abril","de maig","de juny","de juliol","d'agost","de setembre","d'octubre","de novembre","de desembre");
Dia = data.getDay();
if (Dia == 0) DiaN = "Diumenge, ";
else{   if (Dia == 1) DiaN = "Dilluns, ";
else{   if (Dia == 2) DiaN = "Dimarts, ";
else{   if (Dia == 3) DiaN = "Dimecres, ";
else{   if (Dia == 4) DiaN = "Dijous, ";
else{   if (Dia == 5) DiaN = "Divendres, ";
else{   if (Dia == 6) DiaN = "Dissabte, ";
}}}}}}
var any = data.getFullYear();
document.write( DiaN + data.getDate() + "&nbsp;" + mesos[Mes] + "&nbsp;de&nbsp;" + any + "&nbsp;&nbsp;&nbsp;&nbsp;");
}

function diaform(){
fechaz = new Date();
mesij = fechaz.getMonth() + 1;
var mesij = (mesij < 10) ? "0" + mesij : mesij;
var anios = fechaz.getFullYear();
document.write( fechaz.getDate() + "/" + mesij + "/" + anios );
}

function ExplorerFix() {
for (a in document.links) document.links[a].onfocus = document.links[a].blur; }
if (document.all) {
document.onmousedown = ExplorerFix; 
}

function getWinNm() {
  var now = new Date();
  var hr = new String(now.getHours());
  var mn = new String(now.getMinutes());
  var sc = new String(now.getSeconds());
  var winNm = hr + mn + sc;
  return winNm;
}

function mouseOver(quin) {
self.status=quin;
}

function mouseOut() {
self.status="COBDC - 10es. Jornades Catalanes d'Informació i Documentació";
}

function imprime(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}

var SEUWEB = 'cobdc.org';

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
    document.cookie = curCookie;
}
function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
function fixDate (date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}
function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    setCookie('mtcmtauth', f.author.value, now, '', SEUWEB, '');
    setCookie('mtcmtmail', f.email.value, now, '', SEUWEB, '');
    setCookie('mtcmthome', f.url.value, now, '', SEUWEB, '');
}
function forgetMe (f) {
    deleteCookie('mtcmtmail', '', SEUWEB);
    deleteCookie('mtcmthome', '', SEUWEB);
    deleteCookie('mtcmtauth', '', SEUWEB);
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}

function doOBRE(url){
	var x = 700;
	var y = 400;
	var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var posx = (aw - x) / 2;
    var posy = (ah - y) / 2;
	var winNm = getWinNm();
	var cgi = url;
	var recurs = window.open(cgi, 
winNm,'resizable=1,toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+x+',height='+y+',left='+posx+',top='+posy+'');
}

function doCOBDC(url){
	var x = 700;
	var y = 400;
	var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var posx = (aw - x) / 2;
    var posy = (ah - y) / 2;
	var winNm = getWinNm();
	var cgi = 'http://www.cobdc.org/' + url;
	var recurs = window.open(cgi, 
winNm,'resizable=1,toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,width='+x+',height='+y+',left='+posx+',top='+posy+'');
}

function doPDF(pdf,ti){
	var x = 750;
	var y = 550;
	var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var posx = (aw - x) / 2;
    var posy = (ah - y) / 2;
	mem=pdf;
	tituloi=ti;
	features = "resizable=1,width="+x+",height="+y+",screenX="+posx+",screenY="+posy+",left="+posx+",top="+posy;	
	window.open("http://www.cobdc.org/pdf.html",x+y,features);
}

function doPDFintranet(pdf,ti){
	var x = 750;
	var y = 550;
	var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var posx = (aw - x) / 2;
    var posy = (ah - y) / 2;
	mem = pdf;
	link = 'http://www.cobdc.org/intranet/pdf.php?id=' + mem;
	features = "resizable=1,width="+x+",height="+y+",screenX="+posx+",screenY="+posy+",left="+posx+",top="+posy;	
	window.open(link,"oberta",features);
}

function doPDFopen(pdf,ti){
	var x = 750;
	var y = 550;
	var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var posx = (aw - x) / 2;
    var posy = (ah - y) / 2;
	mem = pdf;
	link = 'http://www.cobdc.org/intranet/pdf_lliure.php?id=' + mem;
	features = "resizable=1,width="+x+",height="+y+",screenX="+posx+",screenY="+posy+",left="+posx+",top="+posy;	
	window.open(link,"oberta",features);
}
