﻿// JScript File

MidX=screen.availWidth/2
MidY=screen.availHeight/2

function popup(url,w,h)
 {
	var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=300,height=250');
	nWin.focus();
 }
 
 function VisualPopup(url,w,h)
 {
	var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+w+',height='+h);
	nWin.focus();
 }
 
function popup1(url,w,h)
 {
	var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=500');
	nWin.focus();
 }

function popup2(url,w,h)
 {
	var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=370');
	nWin.focus();
 }

 function ConfirmPrint() {
	var answer = confirm("Are you sure you want to print this page?")
	if (answer){
		window.print();
		window.close();
	}
	else{
		window.close();
	}
}

function emptyData(val,val2)
{
   if(document.getElementById(val).value == val2)
   {
        document.getElementById(val).value = '';
   }
}

function fillData(val,val2)
{
   if(document.getElementById(val).value == '')
   {
        document.getElementById(val).value = val2;
   }
}


function BrowserChecker()
{
    var agt=navigator.userAgent.toLowerCase();
	var is_mac = (agt.indexOf("mac")!=-1);
	var MidX=screen.availWidth/2;
	
	if(is_mac)
	{
	    if(agt.indexOf("safari/419.3") != -1)
        {
//          document.getElementById('aboutmain').style.top = '0px';
//		    document.getElementById('simplymain').style.top = '0px';
        }
		else if(agt.indexOf("mozilla/5.0") != -1)
		{
            //document.getElementById('prodSub').style.width = '145px';
//          document.getElementById('aboutmain').style.top = '0px';
//		    document.getElementById('simplymain').style.top = '0px';
        }
       
        else if(agt.indexOf("opera/9.10") != -1)
        {
//          document.getElementById('aboutmain').style.top = '0px';
//		    document.getElementById('simplymain').style.top = '0px';
        }
		else
		{
		    //document.getElementById('prodSub').style.width = '145px';
//            document.getElementById('aboutmain').style.top = '0px';
//		    document.getElementById('simplymain').style.top = '0px';
        }
	}
	else
	{
		if(agt.indexOf("mozilla/5.0") != -1)
		{
//		    document.getElementById('aboutmain').style.top = '0px';
//		    document.getElementById('simplymain').style.top = '0px';
		    //document.getElementById('rightBorder').style.borderRight = '145px';
		} 
		else if(agt.indexOf("opera/9.10") != -1)
        {
//          document.getElementById('aboutmain').style.top = '0px';
		    document.getElementById('fish').align = 'middle';
        }
		else
		{
            
		}
	}	
		
}


var slideShowSpeed = 20;
    
var crossFadeDuration = 10
var Pic = new Array()
var pgName = "";

for(var k = 0; k < 11; k++)
{
    Pic[k] = '}Images/houseBrands/'+ eval(k+1) +'.jpg';
}

var t
var j = 0
var p = Pic.length

var preLoad = new Array()

for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   
   preLoad[i].src = Pic[i]
 }

var count = 0;
var slideSpeed = 4000;


function runSlideShow()
{
    if (document.all){
        document.images.SlideShow.style.filter="blendTrans(duration=2)"
        document.images.SlideShow.style.filter="blendTrans(duration=3)"
        document.images.SlideShow.filters.blendTrans.Apply()   
        document.images.SlideShow.style.display = 'block';
    }
    document.images.SlideShow.src = preLoad[j].src;
    if (document.all){
        document.images.SlideShow.filters.blendTrans.Play();
    }

    j = j + 1
    if (j > (p-1)) j=0 
       
   t = setTimeout('runSlideShow();', slideSpeed);
}

