function openWindow(url, width, height, resizable, scrollable) {

	var x = (screen.availWidth - width)/2;
	var y = (screen.availHeight - height)/2;
	var r = resizable ? "yes" : "no";
	var s = scrollable ? "yes" : "no";
	var features = "toolbar=no,location=no,status=yes,menubar=no,scrollbars="+s+",resizable="+r+",width="+width+",height="+height+",screenX="+x+",screenY="+y+",top="+y+",left="+x;
	window.open(url, "winFLY", features);

}

function openPrivacy(pre) {
	var u = (pre == null) ? "privacy/privacy.html#cpp" : pre + "privacy/privacy.html#cpp";
	openWindow(u, 470, 306, false, true);
}

function openRules(pre) {
	var u = (pre == null) ? "rules/index.html" : pre + "rules/index.html";
	openWindow(u, 470, 500, false, true);
}


function openSupport(pre) {
	var u = (pre == null) ? "support/index.html" : pre + "support/index.html";
	openWindow(u, 470, 306, false, true);
}
function openContact(pre) {
	var u = (pre == null) ? "contact_us/index.html" : pre + "contact/index.html";
	openWindow(u, 470, 260, false, true);
}

function openPCDownload(pre) {
	var u = (pre == null) ? "flydesktop/index_pc.html" : pre + "flydesktop/index_pc.html";
	openWindow(u, 470, 225, false, true);
}

function openMacDownload(pre) {
	var u = (pre == null) ? "flydesktop/index_mac.html" : pre + "flydesktop/index_mac.html";
	openWindow(u, 470, 225, false, true);
}

function openPCFlyball(id, pre) {
	var u = (pre == null) ? "flyballcard/pc/index.html?"+id : pre + "flyballcard/pc/index.html?"+id;
	openWindow(u, 470, 225, false, true);
}

function openMacFlyball(id, pre) {
	var u = (pre == null) ? "flyballcard/mac/index.html?"+id : pre + "flyballcard/mac/index.html?"+id;
	openWindow(u, 470, 225, false, true);
}

function openWhereToBuy(id, pre) {
	var u = (pre == null) ? "where.html?"+id : pre + "where.html?"+id;
	openWindow(u, 470, 322, false, true);
}

function setHome(pre){
	var u = (pre == null) ? "setHome.html" : pre + "setHome.html";
	openWindow(u, 470, 237, false, true);
}