/*
Following function opens a new window without any chrome or additional bars. 
url_add argument relates to url to open in new window
winwidth is width of window to open (formatted to work in IE)
winheight is height of window to open (formatted to work in IE)

newwindow2.innerWidth=winwidth;
newwindow2.innerHeight=winheight;
	
*/


function open_win(url_add,winwidth,winheight)
   {

	newwindow2=window.open('','Elliott_Carpets_Popup','width='+winwidth+',height='+winheight+',menubar=no,status=no,location=no,toolbar=no,scrollbars=no');

	newwindow2.resizeTo(winwidth,winheight);

	var tmp = newwindow2.document;
	tmp.write('<html><head><title>Elliott Carpets Popup Window</title>');
	tmp.write('<link rel="stylesheet" type="text/css" href="css/default.css">');
	tmp.write('</head><body>');
	tmp.write('<img src="'+url_add+'" alt="Elliott Carpets Popup Image" width="'+winwidth+'" height="'+winheight+'">');
	tmp.write('</body></html>');
	tmp.close();
	
	newwindow2.focus()

   }

/*
Following function displays news item text. newsitem argument relates to number of item to display
*/

function displaynews(newsitem)
{
switch(newsitem)
{
case 1:
document.write ('<span class="header">Investor In People</span>');
document.write ('<p align="left"><img src="images/site/IIP.jpg" alt="Elliott Carpets - Proud to be an Investor In People" width="190" height="127" /></p>');
document.write ('<p align="left">Elliott Carpets are proud to be an Investor in People. Find out more by visiting <a href="http://www.investorsinpeople.co.uk">www.investorsinpeople.co.uk</a></p>');
break;

case 2:
document.write ('<span class="header">New Store in Alfreton</span>');
document.write ('<p>Elliott Carpets are opening a new store in Alfreton, with a large showroom and customer car park. <a href="News.html">Read more ></a></p>');
document.write ('<span class="header">New Website Launched </span>');
document.write ('<p>Our new website is now live, providing a new look and feel, and more content for you to browse. <a href="News.html">Read more ></a></p>');
break;

default:
document.write('');
}
}
/*
Following function constructs the navigation menu. currentmenu argument relates to number of menu item top-bottom and controls link destination
*/
function displaymenu(currentmenu)
{
document.write ('<ul id="subnavlist">');
if (currentmenu!=1)
{
document.write ('<li><a href="Index.html">Home</a></li>');
}
else
{
document.write ('<li><a href="#">Home</a></li>');
}

if (currentmenu!=2)
{
document.write ('<li><a href="AboutUs.html">About Us</a></li>');
}
else
{
document.write ('<li><a href="#">About Us</a></li>');
}

if (currentmenu!=3)
{
document.write ('<li><a href="Products.html">Products</a></li>');
}
else
{
document.write ('<li><a href="#">Products</a></li>');
}

if (currentmenu!=4)
{
document.write ('<li><a href="Links.html">Links</a></li>');
}
else
{
document.write ('<li><a href="#">Links</a></li>');
}

if (currentmenu!=5)
{
document.write ('<li><a href="ContactUs.html">Contact Us</a></li>');
}
else
{
document.write ('<li><a href="#">Contact Us</a></li>');
}

if (currentmenu!=6)
{
document.write ('<li><a href="News.html">News</a></li>');
}
else
{
document.write ('<li><a href="#">News</a></li>');
}

document.write ('</ul>');
}

