Un modo nuovo di fare modelli di campo
Lingua:


function checkMobile() { isMobile = 0; if (screen.width<=640) { isMobile = 1; } setDivClass(isMobile); } function setDivClass(isMobile) { var w = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], x = w.innerWidth || e.clientWidth || g.clientWidth, y = w.innerHeight|| e.clientHeight|| g.clientHeight; if ((x < 640)||(isMobile)) { document.getElementById("page_spacer").width = 1; document.getElementById("column_block_left").className = "div_center"; document.getElementById("column_block_right").className = "div_center"; document.getElementById("title_left").className = "div_center"; document.getElementById("title_right").className = "div_center"; document.getElementById("menu_left").className = "div_center"; document.getElementById("menu_right").className = "div_center"; document.getElementById("menu_table").width = 1; } else { document.getElementById("page_spacer").width = 640; document.getElementById("column_block_left").className = "div_left"; document.getElementById("column_block_right").className = "div_right"; document.getElementById("title_left").className = "div_left"; document.getElementById("title_right").className = "div_right"; document.getElementById("menu_left").className = "div_left"; document.getElementById("menu_right").className = "div_right"; document.getElementById("menu_table").width = 600; }; }