function lanz() { DWidth = document.body.clientWidth; DHeight = document.body.clientHeight; PositionW = (DWidth/2)-(913/2); PositionH = DHeight - 300; ObjDiv = document.getElementById('Base-w'); ObjDiv.style.left = PositionW; ObjDiv = document.getElementById('center'); ObjDiv.style.height = PositionH; ObtDatos('a1'); } function Bttover(id,sec) { ObjDiv = document.getElementById(id).style; ObjDiv.cursor = "pointer"; if (sec=='i') { ObjDiv.backgroundImage = "url(images/lfm1.png)"; ObjDiv.color = '#000000'; } if (sec=='m') { ObjDiv.backgroundImage = "url(images/lfm2.png)"; ObjDiv.color = '#000000'; } if (sec=='f') { ObjDiv.backgroundImage = "url(images/lfm3.png)"; ObjDiv.color = '#000000'; } } function Bttout(id,sec) { ObjDiv = document.getElementById(id).style; if (sec=='i') { ObjDiv.backgroundImage = "url(images/mft1.png)"; ObjDiv.color = '#FFFFFF';} if (sec=='m') { ObjDiv.backgroundImage = "url(images/mft2.png)"; ObjDiv.color = '#FFFFFF';} if (sec=='f') { ObjDiv.backgroundImage = "url(images/mft3.png)"; ObjDiv.color = '#FFFFFF';} } // --- Ajax ---- function createRequestObject(){ var peticion; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ peticion = new ActiveXObject("Microsoft.XMLHTTP"); } else{ peticion = new XMLHttpRequest(); } return peticion; } function ObtDatos(id) { var obj = document.getElementById('m_center'); var http = new Array(); var act = new Date(); http[act] = createRequestObject(); http[act].open('get', 'modules/index.php?id='+id); http[act].onreadystatechange = function() { if (http[act].readyState == 4) { if (http[act].status == 200 || http[act].status == 304) { obj.innerHTML = http[act].responseText; } } } http[act].send(null); }