//ns4 = (document.layers)? true:false
//ie4 = (document.all)? true:false

//Declaració de diferents navegadors
if (parseInt(navigator.appVersion) >= 4) {
	if(navigator.appName == "Netscape") {
		if (navigator.appName.indexOf("MSIE 5")!=1&& parseInt(navigator.appVersion)>=5) {
			var dom=true;
			doc1 = "document.getElementById('";
			doc2 = "').style"
			}
		else {
			var ns4=true;
			doc1 = "document.layers['";
			doc2 = "']";
			}
		}
	else {
		var ie4=true;
		doc1 = "document.all['";
		doc2 = "'].style";
	}
}


function centrada(pagina)
{
        altura=screen.height;
        anchura=screen.width;
        posx= parseInt((anchura/2)-(550/2));
        posy= parseInt((altura/2)-(490/2));
        curriwin=open(pagina,"curri","resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=550,height=490,left="+posx+",top="+posy+",screenLeft="+posx+",screenTop="+posy+"");
        curriwin.focus();
}

function centrada2(paginao)
{
        altura=screen.height;
        anchura=screen.width;
        posx= parseInt((anchura/2)-(450/2));
        posy= parseInt((altura/2)-(450/2));
        oferteswin=open(paginao,"ofertes","resizable,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,width=450,height=450,left="+posx+",top="+posy+",screenLeft="+posx+",screenTop="+posy+"");
        oferteswin.focus();
}

function centrada3(onsom)
{
        altura=screen.height;
        anchura=screen.width;
        posx= parseInt((anchura/2)-(700/2));
        posy= parseInt((altura/2)-(560/2));
        onsomwin=open(onsom,"pagonsom","resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=700,height=560,left="+posx+",top="+posy+",screenLeft="+posx+",screenTop="+posy+"");
        onsomwin.focus();
}

function centrada4(imprimir)
{
        imprimirwin=open(imprimir,"imprimir","resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=720,height=525,left=0,top=0");
        imprimirwin.focus();
}

function centrada5(wdades)
{
        dadeswin=open(wdades,"dades","resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=400,height=400,left=0,top=0");
        dadeswin.focus();
}

