var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
	MSDetect = "true";

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}



function RunHome()
{
if (flashinstalled == 2)
	{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=";http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="100%" HEIGHT="65%" id="MyMovieName">\n');
	document.write('<PARAM NAME=movie VALUE="flash/home.swf">\n');
	document.write('<PARAM NAME=quality VALUE="high">\n');
	document.write('<PARAM NAME=wmode VALUE="transparent">\n');
	document.write('<EMBED src="flash/home.swf" quality="high" WMODE="transparent" WIDTH="100%" HEIGHT="65%" NAME="MyMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">\n');
	document.write('</EMBED>\n');
	document.write('</OBJECT>\n');
	}
else
	{
	document.write('<p>Welcome to Windowlink... the home of high performance easy to use window, door and conservatory design software</p>')
	document.write('<p>Are you a small business operator with one or two sales people selling <a href="">Windows & Doors</a> or <a href="">Conservatories?</a> Save time and speed up sales with our easy to use software!</p>')
	document.write('<p>Are you a retail outlet with a sales team selling <a href="">Windows & Doors</a> or <a href="">Conservatories</a> in the domestic market? Look at the best presentation, pricing, sales and production packages in the business.</p>')
	document.write('<p>Are you a <a href="">trade supplier</a> that wants your over-the-counter customers to be more efficient, eliminating the need to ‘scribble’ orders?</p>')
	document.write('<p>Are you a manufacturer requiring high-efficiency software for <a href="">frame production?</a>  Contact us now for information about our latest manufacturing programs.</p>')
	}
}
	
	

function RunNavAboutUs()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="122" height="35">\n');
	document.write('<param name="movie" value="nav/about-us.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/about-us.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="122" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="index.asp"><img src="images/aboutus.jpg" alt="About Us"></a>')
	}
}

function RunNavProducts()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="122" height="35">\n');
	document.write('<param name="movie" value="nav/products.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/products.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="122" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/products.jpg" alt="Products"></a>')
	}
}

function RunNavCustomising()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="138" height="35">\n');
	document.write('<param name="movie" value="nav/customising.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/customising.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="138" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="customising.asp"><img src="images/customising.jpg" alt="Customising"></a>')
	}
}

function RunNavSupport()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="112" height="35">\n');
	document.write('<param name="movie" value="nav/support.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/support.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="112" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/support.jpg" alt="Support"></a>')
	}
}

function RunNavNews()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90" height="35">\n');
	document.write('<param name="movie" value="nav/news.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/news.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/news.jpg" alt="News"></a>')
	}
}

function RunNavContact()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="104" height="35">\n');
	document.write('<param name="movie" value="nav/contact.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="nav/contact.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="104" height="35"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/contact.jpg" alt="Contact"></a>')
	}
}

function RunFocus()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="186" height="142">\n');
	document.write('<param name="movie" value="flash/focus.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="flash/focus.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="186" height="142"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/contact.jpg" alt="Contact"></a>')
	}
}

function RunVector()
{
if (flashinstalled == 2)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="186" height="142">\n');
	document.write('<param name="movie" value="flash/vector.swf">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<embed src="flash/vector.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="186" height="142"></embed>\n');
	document.write('</object>\n');
	}
else
	{
	document.write('<a href="products.asp"><img src="images/contact.jpg" alt="Contact"></a>')
	}
}

function RunPopFocus()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="380">\n');
document.write('<param name="movie" value="flash/popfocus.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="flash/popfocus.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="380"></embed>\n');
document.write('</object>\n');
}

function RunPopVector()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="380">\n');
document.write('<param name="movie" value="flash/popvector.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="flash/popvector.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="380"></embed>\n');
document.write('</object>\n');
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);