/***********************************************

* Safe email links

***********************************************/



function hideEmail() {

	var s1 = "compair";

					var s2 = "@";

					var s3 = "iinet.net.au";

					var s4 = "?Subject=Enquiry%20from%20Complete%20Air%20Systems";

					var s5 = "email us now";

					document.write("<a href=" + "mail" + "to:" + s1 + s2 + s3 + s4 + ">" + s5 + "</a>");

}





/***********************************************

* Calling external link instead of target="_blank"

***********************************************/





function externalLinks() { 



if (!document.getElementsByTagName) return; 



var anchors = document.getElementsByTagName("a"); 

for (var i=0; i<anchors.length; i++) { 

var anchor = anchors[i]; 

var relvalue = anchor.getAttribute("rel");



if (anchor.getAttribute("href")) {

var external = /external/;

var relvalue = anchor.getAttribute("rel");

if (external.test(relvalue)) { anchor.target = "_blank"; }

} 

}

} 

window.onload = externalLinks;





/***********************************************

* Random Images Script

***********************************************/



<!-- Begin

// Set up the image files to be used.

var theImages = new Array() // do not change this

// To add more image files, continue with the

// pattern below, adding to the array.



theImages[0] = 'images/core/inner-pic1.jpg'

theImages[1] = 'images/core/inner-pic2.jpg'

theImages[2] = 'images/core/inner-pic3.jpg'

theImages[3] = 'images/core/inner-pic4.jpg'



// do not edit anything below this line



var j = 0

var p = theImages.length;

var preBuffer = new Array()

for (i = 0; i < p; i++){

   preBuffer[i] = new Image()

   preBuffer[i].src = theImages[i]

}

var whichImage = Math.round(Math.random()*(p-1));

function showImage(){

document.write('<img src="'+theImages[whichImage]+'">');

}



//  End -->



