var timenowrandimage56254 = 0;
var counttimerrandimage56254 = -1;
var counttimerlrandimage56254 = counttimerrandimage56254;
var timesetrandimage56254 = 10;
var nimagerandimage56254 = new Image;
var imagesrandimage56254 = new Array('http://www.cgiconnection.com/randimage4/images/newzealand13-2.jpg','http://www.cgiconnection.com/randimage4/images/newzealand13flip-2.jpg');
var urlsrandimage56254 = new Array('http://','http://');
var timesrandimage56254 = new Array('','');
var newwinsrandimage56254 = new Array('','');
var footersrandimage56254 = new Array('','');
var timerrandimage56254;
var timerfrandimage56254;
var i = 0;
var preloadimgrandimage56254 = 0;
var footerrandimage56254 = '
Powered by CGI Connection';
var statusrandimage56254 = '';
var floatidrandimage56254 = 0;
var zoomidrandimage56254 = 0;
var carrandimage56254 = 1;
var fadeSpeedrandimage56254 = 10;
var outTime = 2100 - (fadeSpeedrandimage56254 * 35);
var objrandimage56254;
var opacityrandimage56254;
var nsrandimage56254 = document.layers;
var ierandimage56254 = document.all;
var fadeinvalrandimage56254 = "";
var fadeoutvalrandimage56254 = "";
var sliderandimage56254 = 0;
var zfrandimage56254 = 0.075;
var ztrandimage56254 = 500;
var wcrandimage56254;
var Elemrandimage56254;
var yPosrandimage56254 = 0;
var xPosrandimage56254 = 0;
var xPostrandimage56254 = 0;
var yPostrandimage56254 = 0;
var gsrandimage56254 = "";
if (preloadimgrandimage56254 == 1)
{
for(i=0; i < imagesrandimage56254.length; i++)
{
nimagerandimage56254.src = imagesrandimage56254[i];
}
}
function setOpacrandimage56254(objrandimage56254, opacityrandimage56254) {
opacityrandimage56254 = (opacityrandimage56254 == 100)?99.999:opacityrandimage56254;
if (nsrandimage56254)
{
objrandimage56254.style.MozOpacity = opacityrandimage56254/100;
}
else if (ierandimage56254)
{
objrandimage56254.style.filter = "alpha(opacity:"+opacityrandimage56254+")";
}
else
{
objrandimage56254.style.opacity = opacityrandimage56254/100;
}
}
function fadeInrandimage56254(objIdrandimage56254,opacityrandimage56254) {
if (document.getElementById) {
objrandimage56254 = document.getElementById(objIdrandimage56254);
if (opacityrandimage56254 <= 100) {
setOpacrandimage56254(objrandimage56254, opacityrandimage56254);
opacityrandimage56254 += fadeSpeedrandimage56254;
window.setTimeout("fadeInrandimage56254('" + objIdrandimage56254 +"',"+opacityrandimage56254+")", 100);
}
else
{
setOpacrandimage56254(objrandimage56254, 100);
}
}
}
function fadeOutrandimage56254(objIdrandimage56254,opacityrandimage56254) {
if (document.getElementById) {
objrandimage56254 = document.getElementById(objIdrandimage56254);
if (opacityrandimage56254 >= 0) {
setOpacrandimage56254(objrandimage56254, opacityrandimage56254);
opacityrandimage56254 = opacityrandimage56254 - fadeSpeedrandimage56254;
window.setTimeout("fadeOutrandimage56254('" + objIdrandimage56254 +"',"+opacityrandimage56254+")", 100);
}
else
{
setOpacrandimage56254(objrandimage56254, 0);
}
}
}
function changeTextrandimage56254(div_id,val){
elm=document.getElementById(div_id);
elm.innerHTML = '
' + val + footerrandimage56254 + '
';
}
document.write('');
if (floatidrandimage56254 == 1)
{
document.write('');
}
document.write('
');
document.write('
');
document.write('');
if (carrandimage56254 == 1)
{
document.write('');
}
if (sliderandimage56254 == 1)
{
document.write('');
document.write(' ');
document.write(' ');
document.write(' ');
}
if (sliderandimage56254 != 1 && carrandimage56254 != 1)
{
if (zoomidrandimage56254 == 0)
{
document.write('');
}
else
{
document.write('');
}
document.write(' ');
document.write(' |
');
}
if (sliderandimage56254 == 1 || carrandimage56254 == 1)
{
document.write('' + footerrandimage56254 + ' |
');
}
else
{
document.write(' |
');
}
document.write('');
document.write('
');
if (floatidrandimage56254 == 1)
{
document.write('
');
}
var imageIdrandimage56254 = 'randimage56254';
var imageElemrandimage56254 = document.getElementById(imageIdrandimage56254);
var tempURLnum;
function go_urlrandimage56254(tempURLnum,openinnew,templink,tempsrc) {
window.status = statusrandimage56254;
var myURL = "";
var isNew = "";
var mySRC = "";
var mainURL = "http://www.cgiconnection.com/cgi-bin/cgi-con/randimage4.cgi";
var recURL56254 = 0;
if (tempURLnum > 0)
{
counttimerrandimage56254 = tempURLnum - 1;
}
if (tempURLnum == -1)
{
myURL = templink;
mySRC = tempsrc;
isNew = openinnew;
}
else
{
myURL = urlsrandimage56254[counttimerrandimage56254];
mySRC = imagesrandimage56254[counttimerrandimage56254];
isNew = newwinsrandimage56254[counttimerrandimage56254];
}
if (myURL != "" && myURL != "http://")
{
if (recURL56254 == 1)
{
myURL = mainURL + '?filename=new_zealand&gourl=' + escape(myURL) + '&img=' + escape(mySRC);
}
if (isNew == "Y")
{
window.open(myURL,'RandomImage','resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,width=790,height=550,top=10,left=10');
}
else
{
location.href = myURL;
}
}
}
function go_backrandimage56254() {
clearTimeout(timerfrandimage56254);
window.status = statusrandimage56254;
counttimerlrandimage56254 = counttimerrandimage56254;
counttimerrandimage56254 = counttimerrandimage56254 - 1;
begin_imagerandimage56254(1);
}
function go_nextrandimage56254() {
clearTimeout(timerfrandimage56254);
window.status = statusrandimage56254;
counttimerlrandimage56254 = counttimerrandimage56254;
counttimerrandimage56254++;
begin_imagerandimage56254(1);
}
function begin_imagerandimage56254(doit) {
if (counttimerrandimage56254 >= (imagesrandimage56254.length - 1))
{
if (doit < 1)
{
counttimerrandimage56254 = 0;
}
}
else
{
if (doit < 1)
{
counttimerrandimage56254++;
}
}
if (counttimerrandimage56254 < 0 && doit == 1)
{
counttimerrandimage56254 = imagesrandimage56254.length - 1;
}
if (counttimerrandimage56254 > (imagesrandimage56254.length - 1) && doit == 1)
{
counttimerrandimage56254 = 0;
}
var tempTime = timesrandimage56254[counttimerrandimage56254];
if (tempTime < 1)
{
tempTime = timesetrandimage56254;
}
tempTime = tempTime * 1000;
if (fadeinvalrandimage56254 == 'Y')
{
setOpacrandimage56254(imageElemrandimage56254, 0);
}
if (fadeinvalrandimage56254 == '' && fadeoutvalrandimage56254 == 'Y')
{
setOpacrandimage56254(imageElemrandimage56254, 100);
}
nimagerandimage56254.src = imagesrandimage56254[counttimerrandimage56254];
document.randimage56254.src = nimagerandimage56254.src;
changeTextrandimage56254("divtextrandimage56254",footersrandimage56254[counttimerrandimage56254]);
if (fadeinvalrandimage56254 == 'Y')
{
fadeInrandimage56254(imageIdrandimage56254,0);
}
if (fadeoutvalrandimage56254 == 'Y')
{
timerfrandimage56254 = setTimeout('fadeOutrandimage56254(imageIdrandimage56254,100);', (tempTime - outTime));
}
clearTimeout(timerrandimage56254);
timerrandimage56254 = setTimeout('begin_imagerandimage56254(0);', tempTime);
}
function dimsrandimage56254(Elemrandimage56254) {
var ns4 = document.layers;
var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1);
var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1);
var agt=navigator.userAgent.toLowerCase();
var mac = (agt.indexOf("mac")!=-1);
var ie = (agt.indexOf("msie") != -1);
var mac_ie = mac && ie;
if (xPosrandimage56254 > 0)
{
xPostrandimage56254 = xPosrandimage56254;
yPostrandimage56254 = yPosrandimage56254;
wcrandimage56254.style.width = xPosrandimage56254;
wcrandimage56254.style.height = yPosrandimage56254;
}
if (ns4) {
var Elemrandimage56254 = getObjNN4(document, Elemrandimage56254);
yPosrandimage56254 = Elemrandimage56254.clip.height;
xPosrandimage56254 = Elemrandimage56254.clip.width;
return;
}
else {
var Elemrandimage56254;
if(document.getElementById) {
var Elemrandimage56254 = document.getElementById(Elemrandimage56254);
}
else if (document.all) {
var Elemrandimage56254 = document.all[Elemrandimage56254];
}
}
if (op5) {
yPosrandimage56254 = Elemrandimage56254.style.pixelHeight;
xPosrandimage56254 = Elemrandimage56254.style.pixelWidth;
}
else {
yPosrandimage56254 = Elemrandimage56254.offsetHeight;
xPosrandimage56254 = Elemrandimage56254.offsetWidth;
}
}
function znrandimage56254() {
clearTimeout(timerrandimage56254);
clearTimeout(timerfrandimage56254);
czrandimage56254();
if (xPosrandimage56254 > 0)
{
wcrandimage56254.style.width = xPosrandimage56254;
wcrandimage56254.style.height = yPosrandimage56254;
}
dimsrandimage56254("randimage56254");
window.status=statusrandimage56254;
zoomrandimage56254(xPosrandimage56254,yPosrandimage56254,'randimage56254','in');
timerrandimage56254 = setTimeout("czrandimage56254();", ztrandimage56254);
}
function zbrandimage56254() {
xPostrandimage56254 = xPosrandimage56254;
yPostrandimage56254 = yPosrandimage56254;
clearTimeout(timerrandimage56254);
czrandimage56254();
setOpacrandimage56254(imageElemrandimage56254, 100);
zoomrandimage56254(xPosrandimage56254,yPosrandimage56254,'randimage56254','out');
timerrandimage56254 = setTimeout('begin_imagerandimage56254(0);', counttimerlrandimage56254);
}
function zhrandimage56254(){
if (gsrandimage56254 == "out" && (xPostrandimage56254 < xPosrandimage56254 || yPostrandimage56254 < yPosrandimage56254))
{
setOpacrandimage56254(imageElemrandimage56254, 100);
xPostrandimage56254 = xPosrandimage56254;
yPostrandimage56254 = yPosrandimage56254;
wcrandimage56254.style.width = xPosrandimage56254;
wcrandimage56254.style.height = yPosrandimage56254;
gsrandimage56254 = "";
czrandimage56254();
return;
}
if (parseInt(wcrandimage56254.style.width)>10&&parseInt(wcrandimage56254.style.height)>10)
{
xPostrandimage56254 = parseInt(wcrandimage56254.style.width) + parseInt(wcrandimage56254.style.width) * zfrandimage56254 * pfrandimage56254;
yPostrandimage56254 = parseInt(wcrandimage56254.style.height) + parseInt(wcrandimage56254.style.height) * zfrandimage56254 * pfrandimage56254;
wcrandimage56254.style.width = xPostrandimage56254;
wcrandimage56254.style.height = yPostrandimage56254;
}
}
function zoomrandimage56254(originalW, originalH, what, state){
gsrandimage56254 = state;
if (!document.all&&!document.getElementById) {
return;
}
wcrandimage56254 = eval("document.images."+what);
pfrandimage56254 = (state=="in")? 1 : -1;
if (wcrandimage56254.style.width=="")
{
wcrandimage56254.style.width=originalW;
wcrandimage56254.style.height=originalH;
}
if (state=="restore"){
xPostrandimage56254 = xPosrandimage56254;
yPostrandimage56254 = yPosrandimage56254;
wcrandimage56254.style.width=originalW;
wcrandimage56254.style.height=originalH;
czrandimage56254();
return;
}
else
{
zhrandimage56254();
}
bzrandimage56254 = setInterval("zhrandimage56254()",100);
}
function czrandimage56254(){
if (window.bzrandimage56254) {
if (gsrandimage56254 != "in" && (xPostrandimage56254 != xPosrandimage56254 || yPostrandimage56254 != yPosrandimage56254))
{
xPostrandimage56254 = xPosrandimage56254;
yPostrandimage56254 = yPosrandimage56254;
wcrandimage56254.style.width = xPosrandimage56254;
wcrandimage56254.style.height = yPosrandimage56254;
gsrandimage56254 = "";
}
clearInterval(bzrandimage56254);
}
}
var tempcount2;
var tempcount5;
var Car_Image_Sources56254 = new Array();
var FootersAll56254 = new Array();
var myNewWin56254 = new Array();
var imglength56254 = imagesrandimage56254.length;
/***********************************************
* Carousel Slideshow script- © Ger Versluis 2003
* Permission granted to DynamicDrive.com to feature script
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var Car_Image_Width56254 = 300;
var Car_Image_Height56254 = 220;
var Car_Border=false;
var Car_Border_Color="white";
var Car_Speed56254 = 2;
var Car_Direction56254 = false;
var Car_NoOfSides56254 = 6;
var tempcounta56254 = 0;
var carTimer56254;
var tempL56254 = 0;
function startItC56254(whichOne) {
if (whichOne == 0)
{
clearTimeout(carTimer56254);
Car_Direction56254 = true;
}
else
{
clearTimeout(carTimer56254);
Car_Direction56254 = false;
}
carTimer56254 = setTimeout("CarImages56254()",50);
}
if (imglength56254 < 6)
{
tempL56254 = 7 - imglength56254;
}
if (tempL56254 < 1)
{
tempL56254 = 1;
}
var mainCount56254 = 0;
for (tempcount5 = 0; tempcount5 < tempL56254; tempcount5++)
{
for (tempcount2 = 0; tempcount2 < imglength56254; tempcount2++)
{
var tempVal = imagesrandimage56254[tempcount2];
Car_Image_Sources56254[tempcounta56254] = tempVal;
FootersAll56254[tempcounta56254] = footersrandimage56254[tempcount2];
myNewWin56254[tempcounta56254] = newwinsrandimage56254[tempcount2];
tempcounta56254++;
Car_Image_Sources56254[tempcounta56254] = urlsrandimage56254[tempcount2];
FootersAll56254[tempcounta56254] = footersrandimage56254[tempcount2];
myNewWin56254[tempcounta56254] = newwinsrandimage56254[tempcount2];
tempcounta56254++;
mainCount56254++;
}
}
imglength56254 = mainCount56254;
CW_I56254 = new Array(Car_NoOfSides56254 / 2+1);C_ClcW56254 = new Array(Car_NoOfSides56254 / 2);
C_Coef56254 = new Array(
3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,
Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
var C_CoefOf56254 = Car_NoOfSides56254 == 4?0:Car_NoOfSides56254 == 6 ? 2:Car_NoOfSides56254 == 8?5:9;
C_Pre_Img56254 = new Array(Car_Image_Sources56254.length);
var C_Angle56254 = Car_Direction56254 ? Math.PI/(Car_NoOfSides56254 / 2):0,C_CrImg56254 = Car_NoOfSides56254,C_MaxW56254,C_TotalW56254,C_Stppd56254=false,i56254,C_LeftOffset56254,C_HalfNo56254 = Car_NoOfSides56254 / 2;
function CarouselStart56254(){
if(document.getElementById){
for(i56254=0;i56254 < Car_Image_Sources56254.length; i56254+=2){
C_Pre_Img56254[i56254]=new Image();C_Pre_Img56254[i56254].src=Car_Image_Sources56254[i56254]}
C_MaxW56254=Car_Image_Width56254 / Math.sin(Math.PI/Car_NoOfSides56254)+C_HalfNo56254 + 1;
Car_Div=document.getElementById("Carousel56254");
for(i56254=0;i56254= Math.PI/C_HalfNo56254)){
if(C_CrImg56254 == Car_Image_Sources56254.length)C_CrImg56254=0;
if(Car_Direction56254){
CW_I56254[C_HalfNo56254] = CW_I56254[0];
for(i56254=0;i56254 0;i56254--)CW_I56254[i56254]=CW_I56254[i56254-1];
CW_I56254[0]=CW_I56254[C_HalfNo56254];
CW_I56254[0].src=Car_Image_Sources56254[C_CrImg56254];
CW_I56254[0].lnk=Car_Image_Sources56254[C_CrImg56254+1];
CW_I56254[0].desc=FootersAll56254[C_CrImg56254];
CW_I56254[0].newwin=myNewWin56254[C_CrImg56254];
}
C_Angle56254 = Car_Direction56254 ? Math.PI/C_HalfNo56254:0;C_CrImg56254+=2;}}
carTimer56254 = setTimeout("CarImages56254()",50);}
function C_LdLnk56254(){go_urlrandimage56254(-1,this.newwin,this.lnk,this.src);}
function C_Stp56254(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd56254=true;changeTextrandimage56254("divtextrandimage56254",this.desc);}
function C_Rstrt56254(){C_Stppd56254=false;changeTextrandimage56254("divtextrandimage56254","");}
setTimeout("CarouselStart56254()",100);