function set_cookie(c_name,value){
document.cookie=c_name+ "=" +escape(value);
}


function get_cookie(c_name){
if (document.cookie.length>0){
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1){ 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}


function detect_resolution() {

	if (navigator.appName.indexOf("Microsoft")!=-1){
		detected_width = document.body.offsetWidth;
		detected_height = document.body.offsetHeight;
	} else {
		detected_width = window.innerWidth;
		detected_height = window.innerHeight;
	}

	reformatpage(detected_width,detected_height);

} //detect_resolution

window.onresize = detect_resolution;
window.onload = detect_resolution;


function reformatpage(width,height){

	if ( (navigator.appName.indexOf("Microsoft")!=-1 && width > 1124) || width > 1140) {
		document.getElementById('outerads').style.display = 'block';
	} else {
		document.getElementById('outerads').style.display = 'none';
	}

} //reformatpage


