function setPos()
{
 body_pos = Position.getCenter(document.body);
 h = body_pos.height;
 wrapper_pos = Position.get('wrapper');
 theTop = (wrapper_pos.height - Math.floor(h/2)) * -1;
 wrapper_pos.top = theTop;
 Position.set('wrapper',0,wrapper_pos.top);
 Position.set('hl_left',0,wrapper_pos.height-89);
 hl_right_pos = Position.get('hl_right');
 Position.set('hl_right',body_pos.width-225,wrapper_pos.height-89);
 Position.set('foot',0,Math.floor(body_pos.height/2)-20);
 if(body_pos.height >= 580)theSize = '1024'; else theSize = '800';
 if(body_pos.height >= 800)theSize = '1280';
 if(body_pos.height < 430) {var donotrender = true;}

//temporary override
theSize = '800';
if(navigator.userAgent.indexOf('MSIE 7') != -1)
{
  var rando = randomString();
}
else
{
  var rando = 'no';
}

 if(!donotrender)
 {
    var s1 = new SWFObject("/flash/family-"+theSize+".swf?r="+rando,"single",body_pos.width,body_pos.height,"8");
    s1.addVariable("width",body_pos.width);
    s1.addVariable("height",body_pos.height);
    //s1.addVariable("window_w",body_pos.width);
    s1.addVariable("url", "http://hopechurch.com/");
    if(feedback_done){s1.addVariable("feedback_done","true");}
    s1.addVariable("autostart", "true");
    s1.useExpressInstall('/flash/expressinstall.swf');
    s1.addParam("wmode", "transparent");
    s1.write("flash");
 }
}
window.onload=function()
{
 setPos();
}
window.onresize=setPos;
function randomString() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 8;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
        return randomstring;
}