Hi, I have never learnt javascript because it is easy to add snippets of code to my web pages. Now I am trying to learn, but my first attempt is not working.
Can anyone explain what I have done wrong?
Code:
resCheck.js

window.onload = resCheck;

function resCheck(){
var change = 
if(screen.width/screen.height>1.4){
	if(screen.width<1100){'http://www.website.co.uk/styles/wideS.css';}else 
	if(screen.width>=1100){'http://www.website.co.uk/styles/wideN.css';}else 
	if(screen.width>1600){'http://www.website.co.uk/styles/wideH.css';}
}else{
	if(screen.width<1024){'http://www.website.co.uk/styles/normS.css';}else 
	if(screen.width>=1024&&screen.width<'1600'){'http://www.website.co.uk/styles/normN.css';}else 
	if(screen.width>=1600){'http://www.website.co.uk/styles/normH.css';}
document.getElementById('style').href=(change);
}
HTML Code:
index.html

<html><head>

<link rel='stylesheet' type='text/css' href='def' id='style' />

<script type='text/javascript' src='resCheck.js'></script>

</head><body></body></html>