function getWinSize(win){ if (!win) win = window; var pos = {x:0,y:0}; if (typeof win.innerWidth != "undefined"){ pos.w = win.innerWidth; pos.h = win.innerHeight; } else if(win.document.body){ pos.w = parseInt(win.document.body.clientWidth); pos.h = parseInt(win.document.body.clientHeight); } return pos; } var size = getWinSize(); if (size.w > 780 && size.h > 350) { //document.write(''); document.write(''); }