function canAjax(){
  var ro;
  var browser = navigator.appName;
  if(browser == 'Microsoft Internet Explorer'){
    ro = new ActiveXObject("Microsoft.XMLHTTP");
  }else{
    ro = new XMLHttpRequest();
  }
  return ro;
}

function pageFlick(pageid){
	var myAjax = new Ajax('inc_gallery.php?aj=1&pager='+pageid, {method: 'get', update: $('imgsrcr')}).request();
}

function mainImg(image){
	if(image.length > 0){
		document.getElementById("mainimg").src = image;
	}
}

function jsMove(id){
  if(canAjax()){
    var myAjax = new Ajax('testimonials.php?ajax=1&pager='+id, {method: 'get', update: $('ajax')}).request();
  }
}

function viewer(img, width, height){
	large = window.open('http://www.warwickreclamation.co.uk/viewer.php?img=' + img, 'info', 'width=' + width + ', height=' + height + ', menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no');
	large.focus();
}

function prodMove(){
	var getProd = document.getElementById("prodswitcher").value;
	location = getProd;
}

function preview(src){
	document.getElementById("mainImage").src = src;
}

function magnify(src, width, height){
	magnify = window.open('../view.php?pic=' + src, 'imgpop', 'width=' + width + ',height=' + height +', scrollbars=no,menubars=no,toolbars=no,statusbar=no');
}
