/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll,resize){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize+' '
win = window.open(mypage,myname,settings)
}


//the end



//=====================================================================
//  DOM Image Rollover v3 (hover)
//
//  Demo: http://chrispoole.com/scripts/dom_image_rollover_hover
//  Script featured on: Dynamic Drive (http://www.dynamicdrive.com)
//=====================================================================
//  copyright Chris Poole
//  http://chrispoole.com
//  This software is licensed under the MIT License 
//  <http://opensource.org/licenses/mit-license.php>
//=====================================================================

function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('hover')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/hover (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/hover (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/hover (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();








//Defines bookmark/favourite details and messeges for different browsers

var bookmarkurl="http://www.avontaxis.co.uk";
var bookmarktitle="Avon Taxis of Evesham";

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle);

else if (window.sidebar) 
        alert('This feature only works for Internet Explorer, use Control+D to bookmark This website');
        
else if( window.opera && window.print ) 
        alert('This feature only works for Internet Explorer, use Control+T to bookmark This website');
}




/************** Cross Slide **************/
/* Comment out entire area to switch cross-slide off */
/*

 $(document).ready(function() {
	$('#banner-fade').crossSlide({
	  sleep: 2,
	  fade: 1
	}, [
	
*/

/* add a new line for each image, add into header.php aswell */
/*

	  { src: 'images/banner.jpg' },
	  { src: 'images/banner2.jpg' },
	  { src: 'images/banner3.jpg' }
	]);
 });
 
*/