function touchScroll(content){
    var el=document.getElementById(content);
    var scrollStartPos=0;

    el.addEventListener("touchstart", function(event) {
        scrollStartPos=this.scrollTop+event.touches[0].pageY;
        event.preventDefault();
    },false);

    el.addEventListener("touchmove", function(event) {
        this.scrollTop=scrollStartPos-event.touches[0].pageY;
        event.preventDefault();
    },false); 
}<!--
function menuCTRL(element, top, left, vis) {
	element.style.top = (top) ? top:null;
	element.style.left = (left) ? left:null;
	element.style.visibility = (vis) ? vis:null;
}
function findInArray (value) {
	for (var i = 0; i < this.length; i++) {
		if (this[i] == value)
			return i;
	}
	return -1;
}
Array.prototype.find = findInArray;
function getparentMenus(element) {
	var array = new Array();
	element = (element.parentNode.getElementsByTagName('DIV').length > 0) ? 
		element.parentNode.getElementsByTagName('DIV')[0]:element;
	while (element.parentNode) {
		if (element.className == 'mP')
			array[array.length] = element;
		element = element.parentNode;
	}
	return array;
} 
function showMenu(element, voffset, hoffset) {
	var mI = getparentMenus(element);
	var mD = document.getElementsByTagName('DIV');
	for (var i = 0; i < mD.length; i++) {
		if (mD[i].className == 'mP') {
			if (mI.find(mD[i]) != -1) {
				if (mD[i].getAttribute('orientation') == '0')
					menuCTRL(mD[i], mD[i].parentNode.clientHeight+mD[i].parentNode.offsetTop+voffset, mD[i].parentNode.offsetLeft, 'visible');
				else if (mD[i].getAttribute('orientation') == '1') {
					menuCTRL(mD[i], mD[i].parentNode.parentNode.offsetTop+2, mD[i].parentNode.parentNode.clientWidth+mD[i].parentNode.parentNode.offsetLeft+hoffset, 'visible');
				}
			} else {
				menuCTRL(mD[i], null, null, 'hidden');
			}
		}
	}
	return false;
}
function menuitem(caption, action, graphic, alt, rollover) {
	this.action = action;
	this.caption = caption;
	this.graphic = graphic;
	this.rollover = rollover;
	this.alt = alt;
	this.items = new Array();
	this.orientation = orVert;
	this.add = function (mi) {
		this.items[this.items.length] = mi;
		mi.parentMenu = this.parentMenu;
		return mi;
	}
	this.write = function () {
		var s = '<td class="caption">';
		s += '<a href="#" onclick="' + (this.action ? this.action:'') + '" onmouseover="showMenu(this, ' + this.parentMenu.menuVOffset + ', ' + this.parentMenu.menuHOffset + ');">';
		s += (this.graphic) ? '<img src="' + this.parentMenu.graphicPath + this.graphic + '" align="absmiddle"':'';
		s += (this.alt) ? ' alt="' + this.alt + '"':'';	
		s += (this.rollover) ? ' onmouseover="this.src=\'' + this.parentMenu.graphicPath + this.graphic.replace('.', 'o.') + '\'" onmouseout="this.src=\'' + this.parentMenu.graphicPath + this.graphic + '\'"':'';
		s += (this.graphic) ? '>':'&nbsp;';
		s += (this.parentMenu.showCaption) ? this.caption:'';
		s += '</a>';
		if (this.items.length > 0) {
			s += '<div class="mP" orientation="' + this.orientation + '" style="width:100%;position:absolute;visibility:hidden;"><table class="submenu"><tr>';
			for (var i=0; i<this.items.length; i++) {
				if (i > 0)
					s+= '<tr>';
				s += this.items[i].write();
				if (i < this.items.length-1)
					s += '</tr>';
			}
			s += '</tr></table></div>';
		}
		s += '</td>';
		if (this.parentMenu.showPointers && this.orientation != 0)
			s += ((this.items.length > 0) ? 
				'<td class="pointer"><img src="' + this.parentMenu.graphicPath + 'pointer.png" style="width:7px;height:7px;"></td>':'<td class="pointer">&nbsp;</td>');		
		return s;
	}
}

//Const
orHorz = 0;
orVert = 1;
function menu() {
	this.graphicPath = 'img/';
	this.orientation = orHorz;
	this.showCaption = true;
	this.showPointers = true;
	this.menuHOffset = 0;
	this.menuVOffset = 0;
	this.items = new Array();
	this.add = function (mi) {
		this.items[this.items.length] = mi;
		mi.orientation = this.orientation;
		mi.parentMenu = this;
		return mi;
	}
	this.write = function () {
		var s = '<div style="position:relative;"><table class="menu" id="dynmenu"><tr>';
		for (var i=0; i<this.items.length; i++) {
			if (this.orientation == 1 && i > 0)
				s += '<tr>';
			s += this.items[i].write();
			if (i < this.items.length-1 && this.orientation ==1)
				s += '</tr>';
		}
		s += '</tr></table></div>';
		document.write(s);
	}		
}
// --><!--
function HMW_open_popup(popA,popB,popC){
 window.open(popA,popB,popC);
}
-->
