function checkBrowser() {
	
    this.ver=navigator.appVersion;
	this.name=navigator.appName;
	this.dom=document.getElementById?1:0;
	this.ie6xp=(this.ver.indexOf("MSIE 6")>-1 && this.ver.indexOf("Windows NT 5.1")>-1 && this.dom)?1:0;
    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns6=(this.dom && (parseInt(this.ver) == 6) && this.name.indexOf("Netscape"))?1:0;
    this.ns5=(this.dom && (parseInt(this.ver) == 5) && this.name.indexOf("Netscape"))?1:0;
	this.ns4=(document.layers && !this.dom && this.name.indexOf("Netscape"))?1:0;
	this.bw=(this.ie6xp || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ns6);
	//alert('ie6: '+this.ie6+'\nie5: '+this.ie5+'\nie4: '+this.ie4+'\nns6: '+this.ns6+'\nns5: '+this.ns5+'\nns4: '+this.ns4);
    return this;
}

function SetPageDimensions(section) {

        var cWidth = document.body.clientWidth;
        var cHeight = document.body.clientHeight;
        var oWidth = document.body.offsetWidth;
        var oHeight = document.body.offsetHeight;
        var aWidth = screen.availWidth;
        var aHeight = screen.availHeight;

        if (section == "main") {
            sWidth = 780;
            sHeight = 452;
        }

        if (section == "one") {
            sWidth = 780;
            sHeight = 365;
        }

        if (section == "catalogue") {
            sWidth == 780;
            sHeight == 325;
        }

        if (screen && bw.ie4 || bw.ie5) {
            sWidth = (aWidth - 20);
            sHeight = (oHeight + 3);
        }

        if (screen && bw.ie6) {
            sWidth = (aWidth - 20);
            sHeight = (oHeight + 3);
        }

        if (screen && bw.ie6xp) {
            sWidth = (aWidth - 29);
            sHeight = (oHeight + 3);
        }

        if (bw.ns4 || bw.ns5 || bw.ns6) {
            sWidth = screen.innerWidth;
            sHeight = screen.innerHeight;
        }

        //alert('Browser: ' +bw.name+ ', ' +bw.ver+ '\nAvailHeight: ' +sHeight+ '\nHeight: ' +sTotalHeight+ '\nAvailWidth: ' +sWidth+ '\nWidth: ' +sTotalWidth);

}

function checkDOM(elementname,option) {
        if (option == 2) {
           //dom = eval('parent.' + sDocObj + '.' + elementname);
           dom = eval('parent.document.getElementById("' + elementname + '")');
           return true;
        }
        if (option == 1) {
           //dom = eval(sDocObj + '.' + elementname + sStyleObj);
           dom = eval('document.getElementById("' + elementname + '")' + sStyleObj);
           return true;
        }
        
        if (option == 0) {
           //dom = eval(sDocObj + '.' + elementname);
           dom = eval('document.getElementById("' + elementname + '")');
           return true;
        }
        else {
           return false;
        }

}

function FadePic(element,image) {

    if (bw.ie5 || bw.ie6 || bw.ie6xp) {

                if (checkDOM(element,0)) {

                   dom.filters.blendTrans.Apply();
                   dom.src = "images/bg/" + image;
                   dom.filters.blendTrans.Play();
                }
                return true
    }
    else {

                if (checkDOM(element,1)) dom.src = "images/bg/" + image;
                return true
    }
}

function LoadPics() {
        
        if (document.images) {

           if (nFadeCount == (imgCt - 1)) {

              FadePic('fadepics',SwapLogo[nFadeCount]);
              FadePic('fadepics2',SwapLogo2[nFadeCount]);
              FadePic('fadepics3',SwapLogo3[nFadeCount]);
              FadePic('fadepics4',SwapLogo4[nFadeCount]);
              //FadePic('ProdPics',myProdPic[nFadeCount]);
              nFadeCount = 0;

           }
           else {

              FadePic('fadepics',SwapLogo[nFadeCount]);
              FadePic('fadepics2',SwapLogo2[nFadeCount]);
              FadePic('fadepics3',SwapLogo3[nFadeCount]);
              FadePic('fadepics4',SwapLogo4[nFadeCount]);
              //FadePic('ProdPics',myProdPic[nFadeCount]);
              nFadeCount += 1;

           }

        }
        setTimeout("LoadPics()", 5 * 1000);

}

function menulink(url)
{
    if(checkDOM('inset',0))
    {
        dom.style.display = 'none';
        
        var html = "";
        
        html += "<object type=\"text/html\" data=\"" + url;
        html += "\" style=\"z-index:121;left: 0px; width: 100%; top: 0px;";
        html += " height: 100%; padding-right: 0px; padding-left: 0px; padding-bottom: 0px;";
        html += " margin: 0px; overflow: visible; ";
        html += " padding-top: 0px; background-color: transparent;\" id=\"msgarea\" />";
        
        dom.innerHTML = html;  
        
        //setTimeout(dom.style.display = '',10000);
        
        pausecomp(2000)
        
        dom.style.display = '';
        
            
    }

}

function welcomelink()
{
    if(checkDOM('inset2',0))
    {
        dom.style.display = 'none';
        
        var html = "";
        
        html += "<object type=\"text/html\" data=\"scripts/front_news.php\" ";
        html += "style=\"z-index:121;left: 0px; width: 100%; position: absolute; top: 0px; "; 
        html += "height: 100%; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; "; 
        html += "margin: 0px; overflow: visible; padding-top: 0px; background-color: transparent;\" id=\"msgarea2\" />";  
        
        dom.innerHTML = html;  
        
        //setTimeout(dom.style.display = '',10000);
        
        pausecomp(1000)
        
        dom.style.display = '';
        
            
    }

}

function linksite(url)
{
    window.open(url);
}
function pausecomp(millis) 
{
    var date = new Date();
    var curDate = null;

    do { curDate = new Date(); } 
    while(curDate-date < millis);
} 



















