A few things...
1) link1 is a string, not a JS variable. Not that I know where the id variable comes from...?
2) You have quoting issues -- you can't put double quotes in a double quoted string literal, or the parser won't know where the string starts and end.
3) document.write() isn't always the best way to go.
4) You have lots of code duplication -- a hash would be better.
5) No semi-colons?
6) No functions?
Something like:
<script type="text/javascript">
var sLink = ( hLinks[id] ) ? id : 'DEFAULT';
var hLinks = {
'link1':{ 'id':'link1', 'href':'#', 'src':'page GFX/New_Products/More_offers.jpg' },
'link2':{ 'id':'link2', 'href':'#', 'src':'page GFX/New_Products/Back_to_start.jpg' },
'DEFAULT':{ 'id':'default, 'href':'#', 'src':'page GFX/New_Products/default.jpg' }
};
var sImageHTML = '<a href="'+hLinks[sLink].href+'" id="'+hLinks[sLink].id+'"><img src="'+hLinks[sLink].src+'"></a>';
document.write( sImageHTML );
</script>
Of course, if I were emehrkay, then writing out the HTML code would be method of an custom object ;-)