function viewLayer(id, formid, nurl, divtype, alpha) { if(!id) id = "Login"; if(!divtype) divtype = true; if(!alpha) alpha = true; if(alpha == true) { if(!top.document.getElementById('alphaDiv')){ createLayer(); }else{ top.document.getElementById('alphaDiv').style.width = '100%'; if(top.document.body.clientHeight > top.document.body.scrollHeight) top.document.getElementById('alphaDiv').style.height = '100%'; else top.document.getElementById('alphaDiv').style.height = top.document.body.scrollHeight; top.document.getElementById('alphaDiv').style.display = 'block'; } } var w = parseInt(top.document.getElementById(id).style.width); var h = parseInt(top.document.getElementById(id).style.height); var window_left = (top.document.body.clientWidth-w)/2; var window_top = (top.document.body.clientHeight-h)/2; this.Lw = h/2; if(id) { this.Lid = id; top.document.getElementById(id).style.display = ''; top.document.getElementById(id).style.top = window_top; top.document.getElementById(id).style.left = window_left; } document.lay_login_form.mb_id.focus(); } function cancelLayer(id){ if(top.document.getElementById('alphaDiv')) top.document.getElementById('alphaDiv').style.display = 'none'; if(id) top.document.getElementById(id).style.display = 'none'; } function createLayer(){ var color = '#525252'; var opacity = '50'; var Alpha = top.document.createElement('div'); Alpha.style.position = 'absolute'; Alpha.style.top = '0px'; Alpha.style.left = '0px'; Alpha.style.width = '100%'; Alpha.style.zIndex = 1; if(top.document.body.offsetHeight > top.document.body.scrollHeight) Alpha.style.height = '100%'; else Alpha.style.height = top.document.body.scrollHeight; Alpha.style.backgroundColor = color; Alpha.style.filter = 'alpha(opacity='+opacity+')'; Alpha.style.opacity = (opacity / 100); Alpha.style.MozOpacity = (opacity / 100); Alpha.style.KhtmlOpacity = (opacity / 100); Alpha.id = 'alphaDiv'; top.document.body.appendChild(Alpha); }