function screenshot(winURL) {
  window.open(winURL,"popup","width=615,height=425");
}
function demosms(winURL) {
  window.open(winURL,"popup","width=935,height=715");
}
function demomta(winURL) {
  window.open(winURL,"popup","width=890,height=650");
}

function demo2mintour(winURL) {
  window.open(winURL,"popup","width=750,height=480");
}

function diagram(winURL) {
  var OpenWindow=window.open(winURL,"popup","width=625,height=405");
}


function prepareLinks() {
	var links = document.getElementsByTagName("a");
	for (var i=0; i<links.length; i++) {
		if (links[i].getAttribute("class") == "enlarge" || links[i].getAttribute("className") == "enlarge") {
			links[i].onclick = function() {
			screenshot(this.getAttribute("href"));
			return false;
			}
		}  
		if (links[i].getAttribute("class") == "demopopSMS" || links[i].getAttribute("className") == "demopopSMS") {
			links[i].onclick = function() {
			demosms(this.getAttribute("href"));
			return false;
			}
		}
		if (links[i].getAttribute("class") == "demopopupMTA" || links[i].getAttribute("className") == "demopopupMTA") {
			links[i].onclick = function() {
			demomta(this.getAttribute("href"));
			return false;
			}
		}
		
		if (links[i].getAttribute("class") == "demopopup2mintour" || links[i].getAttribute("className") == "demopopup2mintour") {
			links[i].onclick = function() {
			demo2mintour(this.getAttribute("href"));
			return false;
			}
		}
		
		if (links[i].getAttribute("class") == "diagram" || links[i].getAttribute("className") == "diagram") {
			links[i].onclick = function() {
			diagram(this.getAttribute("href"));
			return false;
			}
		}
	}
}

window.onload = prepareLinks;