I have an if statement that decides what to render the page in.

```
<script language="JavaScript">
if (NS4) {
    document.write('<LAYER NAME="floatlayer" LEFT="22" TOP="60">');
}

if ((IE4) || (NS6)) {
    document.write('<div id="floatlayer" style="position:absolute; left:22; top:62;">');
}
</script>

```

Now I know this works because this has been the code for previous versions and I had no problems. I created a page that forces the page to render as the most up to date viewer possilbe(IE10,Chrome1) I used a simple Meta tag to do so;

```
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

```

When I go on IE and switch it to Quirks mode the page works correctly and everything is lined up properly but anything other than Quirks the page is broken. What is the reason for this and how can I fix it?