// UnifabPlastics.com Javascripts

<!-- BEGIN IMAGE ON/OFF SCRIPT
        if (document.images) {
            aboutus_on = new Image(); 
            aboutus_on.src = "/images/aboutus_on.gif";
			quoterequest_on = new Image();
			quoterequest_on.src = "/images/quoterequest_on.gif";
			markets_on = new Image();
			markets_on.src = "/images/markets_on.gif";
			products_on = new Image();
			products_on.src = "/images/products_on.gif";
			engineering_on = new Image();
			engineering_on.src = "/images/engineering_on.gif";
			service_on = new Image();
			service_on.src = "/images/service_on.gif";
			installation_on = new Image();
			installation_on.src = "/images/installation_on.gif";
			clients_on = new Image();
			clients_on.src = "/images/clients_on.gif";
			contactus_on = new Image();
			contactus_on.src = "/images/contactus_on.gif";
		
            aboutus_off = new Image(); 
            aboutus_off.src = "/images/aboutus_off.gif";
			quoterequest_off = new Image();
			quoterequest_off.src = "/images/quoterequest_off.gif";
			markets_off = new Image();
			markets_off.src = "/images/markets_off.gif";
			products_off = new Image();
			products_off.src = "/images/products_off.gif";
			engineering_off = new Image();
			engineering_off.src = "/images/engineering_off.gif";
			service_off = new Image();
			service_off.src = "/images/service_off.gif";
			installation_off = new Image();
			installation_off.src = "/images/installation_off.gif";
			clients_off = new Image();
			clients_off.src = "/images/clients_off.gif";
			contactus_off = new Image();
			contactus_off.src = "/images/contactus_off.gif";
        }

// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_on.src");
        }
}

// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_off.src");
        }
}
// END IMAGE ON/OFF SCRIPT-->

<!-- BEGIN FRONT PAGE RANDOM IMAGE ROTATOR -->
<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin Code
var intervalA = 5; // delay between rotating images (in seconds)
var random_displayA = 1; // 0 = no, 1 = yes
intervalA *= 1000; //convert to milliseconds

var image_indexA = 0;
image_listA = new Array();
image_listA[image_indexA++] = new imageItemA("/images/equipment/36-830a.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/C1565VS.gif");
image_listA[image_indexA++] = new imageItemA("/images/equipment/gt75-seriesII.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/gtjr-seriesI.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/H14E_360.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/h14ebig.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/hieco21cp_sm.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/LA-HI-TECH-200_sm.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/Model_MV14P_sm.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/rh20_sm.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/sharp-kmv-1cnc.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/sharp-omv-3cnc.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/uniguard.gif");
image_listA[image_indexA++] = new imageItemA("/images/equipment/unisaws.jpg");
image_listA[image_indexA++] = new imageItemA("/images/equipment/vm16_sm.jpg");
var number_of_imageA = image_listA.length;

function imageItemA(image_locationA) {
this.image_itemA = new Image();
this.image_itemA.src = image_locationA;
}
function get_ImageItemLocationA(imageObjA) {
return(imageObjA.image_itemA.src)
}
function generateA(xA, yA) {
var rangeA = yA - xA + 1;
return Math.floor(Math.random() * rangeA) + xA;
}
function getNextImageA() {
if (random_displayA) {
image_indexA = generateA(0, number_of_imageA-1);
}
else {
image_indexA = (image_indexA+1) % number_of_imageA;
}
var new_imageA = get_ImageItemLocationA(image_listA[image_indexA]);
return(new_imageA);
}
function rotateImageA(placeA) {
var new_imageA = getNextImageA();
document[placeA].src = new_imageA;
var recur_callA = "rotateImageA('"+placeA+"')";
setTimeout(recur_callA, intervalA);
}
//  END FRONT PAGE RANDOM IMAGE ROTATOR-->

<!-- BEGIN PRODUCT PAGE RANDOM IMAGE ROTATOR -->
<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin Code
var intervalB = 5; // delay between rotating images (in seconds)
var random_displayB = 1; // 0 = no, 1 = yes
intervalB *= 1000; //convert to milliseconds

var image_indexB = 0;
image_listB = new Array();
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd1.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd2.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd3.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd4.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd5.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd6.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd7.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd8.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd9.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd10.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd11.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd12.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd13.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd14.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd15.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd16.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd17.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd18.jpg");
image_listB[image_indexB++] = new imageItemB("/images/products/imgProd19.jpg");
var number_of_imageB = image_listB.length;

function imageItemB(image_locationB) {
this.image_itemB = new Image();
this.image_itemB.src = image_locationB;
}
function get_ImageItemLocationB(imageObjB) {
return(imageObjB.image_itemB.src)
}
function generateB(xB, yB) {
var rangeB = yB - xB + 1;
return Math.floor(Math.random() * rangeB) + xB;
}
function getNextImageB() {
if (random_displayB) {
image_indexB = generateB(0, number_of_imageB-1);
}
else {
image_indexB = (image_indexB+1) % number_of_imageB;
}
var new_imageB = get_ImageItemLocationB(image_listB[image_indexB]);
return(new_imageB);
}
function rotateImageB(placeB) {
var new_imageB = getNextImageB();
document[placeB].src = new_imageB;
var recur_callB = "rotateImageB('"+placeB+"')";
setTimeout(recur_callB, intervalB);
}
//  END PRODUCT PAGE RANDOM IMAGE ROTATOR-->

<!-- BEGIN IMAGE POPUP
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 300;
PositionY = 300;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 300;
defaultHeight = 300;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["DisplayImg"].width;');writeln('window.innerHeight=document.images["DisplayImg"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="DisplayImg" src='+imageURL+' style="display:block"><br><div align="center">imageTitle</div><br></body></html>');
close();		
}}
// END IMAGE POPUP VIEWER -->