/*
 * (c) 2011 TANGO LIMA GmbH
 * All rights reserved. Transfer, distribution or storage without prior written permission is prohibited.
 * www.tangolima.de
 */

if (typeof _$tljs_6060165_TL3DAPI == "undefined") { var _$tljs_6060165_TL3DAPI=true;
function _$tljs_6060165_CenterSprite(img, x, y, w, h, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.setImg = function(img) {
this.img = img;_$tljs_6060165_$style(this.node, 'backgroundImage:url('+img+')');}
this.img = img;this.node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(this.node, 'backgroundPosition:center;backgroundRepeat:no-repeat');this.setImg(img);this.placeNode(x,y,w,h,parentNode);}

function _$tljs_6060165_EventHandler(returnValue) {
this.returnValue = returnValue;this.refList = new Array();this.handlerList = new Array();this.add = function(func, ref) {
this.handlerList.push(func);this.refList.push(ref);}
this.getCallback = function(e) {
var self = this;return function(e) {
return self.fire(this, e?e:window.event);}
}
this.fire = function(obj, evt) {
var lastResult = null;for (var i=0; i<this.handlerList.length; i++) {
lastResult = this.handlerList[i](this.refList[i], obj, evt);}
if (typeof this.returnValue == 'undefined')
return lastResult;return this.returnValue;}
}
_$tljs_6060165_EventHandler.singleEvent = function(func, ref) {
var handler = new _$tljs_6060165_EventHandler();handler.add(func, ref);return handler.getCallback();}

function _$tljs_6060165_Frame(x, y, w, h, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.parentNode = parentNode;this.node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(this.node, 'overflow:hidden;');this.placeNode(x, y, w, h, parentNode);}

function _$tljs_6060165_GfxButton(x, y, w, h, gfx, gfxHover, title, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.mouseClickHandler = new _$tljs_6060165_EventHandler();this.parentNode = parentNode;this.node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(this.node, 'overflow:hidden;cursor:pointer');this.hoverSprite = new _$tljs_6060165_Sprite(gfxHover,0,0,w,h,0,this.node);this.hoverSprite.node.title = this.node.title = title;this.hoverSprite.setZ(1);this.sprite = new _$tljs_6060165_Sprite(gfx,0,0,w,h,100,this.node);this.sprite.node.title = this.node.title = title;if (!_$tljs_6060165_isIDevice()) {
this.node.onmouseover = _$tljs_6060165_EventHandler.singleEvent(function(ref) {
ref.hoverSprite.setAlpha(100);}, this);this.hoverSprite.node.onmouseout = _$tljs_6060165_EventHandler.singleEvent(function(ref) {
ref.hoverSprite.setAlpha(0);}, this);}
if (_$tljs_6060165_isIDevice())
this.node.onclick = this.mouseClickHandler.getCallback();else
this.hoverSprite.node.onclick = this.mouseClickHandler.getCallback();this.placeNode(x, y, w, h, parentNode);}

var _$tljs_6060165_NodeObjExtender = {
x: 0,y: 0,w: 0,h: 0,z: 'auto',visible: true,alpha: 100,node: null,xAlign: 'left',yAlign: 'top',setPos: function(x, y) {
this.x = Math.round(x);this.y = Math.round(y);if (this.xAlign == 'right')
_$tljs_6060165_$style(this.node, 'left:auto;right:'+this.x+'px');else
_$tljs_6060165_$style(this.node, 'left:'+this.x+'px;right:auto');if (this.yAlign == 'bottom')
_$tljs_6060165_$style(this.node, 'top:auto;bottom:'+this.y+'px');else
_$tljs_6060165_$style(this.node, 'top:'+this.y+'px;bottom:auto');},setXAlign: function(align) {
this.xAlign = align;this.setPos(this.x, this.y);},setYAlign: function(align) {
this.yAlign = align;this.setPos(this.x, this.y);},setAlign: function(xAlign, yAlign) {
this.xAlign = xAlign;this.yAlign = yAlign;this.setPos(this.x, this.y);},setZ: function(z) {
if (z != 'auto')
this.z = Math.round(z);_$tljs_6060165_$style(this.node, 'zIndex:'+this.z+'');},setSize: function(w, h) {
this.w = Math.round(w);this.h = Math.round(h);if (w != -1)
_$tljs_6060165_$style(this.node, 'width:'+this.w+'px');if (h != -1)
_$tljs_6060165_$style(this.node, 'height:'+this.h+'px');},setAlpha: function(alpha) {
this.alpha = alpha;_$tljs_6060165_$alpha(this.node, alpha);},centerAt: function(px, py) {
var x = Math.round(px-this.w/2);var y = Math.round(py-this.h/2);this.setPos(x, y);},hide: function() {
_$tljs_6060165_$style(this.node, 'display:none');this.visible = false;},show: function() {
_$tljs_6060165_$style(this.node, 'display:block');this.visible = true;},placeNode: function(x, y, w, h, parentNode) {
_$tljs_6060165_$style(this.node, 'position:absolute');if (typeof x != 'undefined' && typeof y != 'undefined')
this.setPos(x, y);if (typeof w != 'undefined' && typeof h != 'undefined')
this.setSize(w, h);this.setAlpha(this.alpha)
if (parentNode)
parentNode.appendChild(this.node);else
document.body.appendChild(this.node);}
}

function _$tljs_6060165_R3DPlayer(options, details, replaceNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.setFrame = function(x, y, setAnyway) {
if (setAnyway || x != this.frame.x || y != this.frame.y) {
this.frame.x = x;this.frame.y = y;this.imageGrid.setCell(x, y);this.zoomImage.setAlpha(0);this.zoomTimer.setDelay(1);}
}
this.offsetFrame = function(x, y) {
this.frame.x += x;this.frame.y += y;var o = this.options;if (o.allowRotation) {
while (this.frame.x < 0) this.frame.x += o.imageFramesX;while (this.frame.x >= this.options.imageFramesX) this.frame.x -= o.imageFramesX;}
else {
if (this.frame.x < 0) this.frame.x = 0;if (this.frame.x >= this.options.imageFramesX) this.frame.x = this.options.imageFramesX-1;}
if (this.frame.y < 0) this.frame.y = 0;if (this.frame.y >= this.options.imageFramesY) this.frame.y = this.options.imageFramesY-1;this.setFrame(this.frame.x, this.frame.y, true);}
this.moveZoom = function(offX, offY) {
/*
var x = this.imageGrid.x + offX;var y = this.imageGrid.y + offY;this.setZoom(this.zoom, x, y);*/
var markX = this.imageGrid.x;var markY = this.imageGrid.y;var x = markX + offX;var y = markY + offY;if (x > this.initGridPos.x) x = this.initGridPos.x;if (y > this.initGridPos.y) y = this.initGridPos.y;if (x+this.imageGrid.w < this.initGridPos.x+this.imageGrid.iw) x = this.initGridPos.x+this.imageGrid.iw-this.imageGrid.w;if (y+this.imageGrid.h < this.initGridPos.y+this.imageGrid.ih) y = this.initGridPos.y+this.imageGrid.ih-this.imageGrid.h;if (markX != x || markY != y) {
this.imageGrid.setPos(x, y);this.zoomImage.setPos(x, y);return (Math.abs(offX)>Math.abs(offY) ? (x!=markX) : (y!=markY) );}
return false;}
this.setZoom = function(zoom, mx, my) {
var oldZoom = this.zoom;if (typeof mx == 'undefined') mx = this.options.width/2;if (typeof my == 'undefined') my = (this.options.height - this.options.menuHeight)/2;if (zoom < 1.01)
zoom = 1;if (zoom > 4)
zoom = 4;var markX = (mx - this.imageGrid.x)/oldZoom*zoom;var markY = (my - this.imageGrid.y)/oldZoom*zoom;this.imageGrid.setZoom(zoom);this.zoomImage.setZoom(zoom);var x = mx - markX;var y = my - markY;if (x > this.initGridPos.x) x = this.initGridPos.x;if (y > this.initGridPos.y) y = this.initGridPos.y;if (x+this.imageGrid.w < this.initGridPos.x+this.imageGrid.iw) x = this.initGridPos.x+this.imageGrid.iw-this.imageGrid.w;if (y+this.imageGrid.h < this.initGridPos.y+this.imageGrid.ih) y = this.initGridPos.y+this.imageGrid.ih-this.imageGrid.h;this.imageGrid.setPos(x, y);this.zoomImage.setPos(x, y);if (zoom == 1 && !this.options.fullscreen) {
this.zoomImage.setAlpha(0);this.zoomTimer.cancel();}
else {
if (this.zoom == 1)
this.zoomTimer.setDelay(1);}
this.zoom = zoom;this.zoomPos.x = x;this.zoomPos.y = y;}
this.setViewmode = function(mode) {
this.targetViewmode = mode;this.mb360.hide();if (this.mbDetail)
this.mbDetail.show();/*
else {
this.mb360.show();if (this.mbDetail)
this.mbDetail.hide();}
*/
if (this.ddDetail) this.ddDetail.hide();}
this.setViewmodeAlpha = function(viewmode, alpha) {
if (viewmode == 'preload')
this.loadImage.setAlpha(alpha);else if (viewmode == '3d')
this.viewFrame.setAlpha(alpha);else if (viewmode == 'detailImage')
this.custFrame.setAlpha(alpha);}
this.play = function() {
this.autoPlay = true;if (this.options.allowAutoPlay) {
this.mbPlay.hide();this.mbPause.show();}
}
this.pause = function() {
this.autoPlay = false;if (this.options.allowAutoPlay) {
this.mbPlay.show();this.mbPause.hide();}
}
this.oldClientSize = {w:-1, h:-1};this.viewmodeStepper = function() {if (this.options.active) {
/*
var heads = document.getElementsByTagName('meta');var heads_i = 0;_$tljs_6060165_pageDbg('c', 0, 0);for (heads_i=0;heads_i<10;heads_i++) {
if (heads_i < heads.length) {
_$tljs_6060165_pageDbg(heads[heads_i].name, 10, heads_i*20);_$tljs_6060165_pageDbg(heads[heads_i].content, 110, heads_i*20);}
else {
_$tljs_6060165_pageDbg('', 10, heads_i*20);_$tljs_6060165_pageDbg('', 110, heads_i*20);}
}
*/
if (this.viewmode != this.targetViewmode && this.viewmodeAlphaStep <= 100)
this.viewmode = this.targetViewmode;if (this.viewmode != this.prevViewmode) {
if (this.options.fullscreen && !_$tljs_6060165_isIDevice()) {
this.setViewmodeAlpha(this.prevViewmode, 0);this.setViewmodeAlpha(this.viewmode, 100);this.prevViewmode = this.viewmode;this.viewmodeAlphaStep = 0;}
else {
if (this.viewmodeAlphaStep <= 200) {
if (this.viewmodeAlphaStep <= 100)
this.setViewmodeAlpha(this.prevViewmode, 100-this.viewmodeAlphaStep);else
this.setViewmodeAlpha(this.viewmode, this.viewmodeAlphaStep-100);this.viewmodeAlphaStep += 20;}
else {
this.prevViewmode = this.viewmode;this.viewmodeAlphaStep = 0;}
}
}
if (this.autoPlay) {
this.autoPlayDelay--;if (this.autoPlayDelay < 0) {
this.offsetFrame(-1, 0);this.autoPlayDelay = 2;if (this.options.autoPlayCount && this.frame.x == this.autoPlayCountTarget) {
this.options.autoPlayCount--;if (!this.options.autoPlayCount)
this.pause();}
}
}
if (this.options.fullscreen) {
var w = 0, h = 0;var wnd = this.options.fullscreenWindow ? this.options.fullscreenWindow : window;if (_$tljs_6060165_isAndroidIDevice()) {
w = wnd.innerWidth;h = wnd.innerHeight;}
else {
if (wnd.innerWidth) w = wnd.innerWidth;else if (wnd.document.documentElement.clientWidth) w = wnd.document.documentElement.clientWidth;else if (wnd.document.body.clientWidth) w = wnd.document.body.clientWidth;if (wnd.innerHeight) h = wnd.innerHeight;else if (wnd.document.documentElement.clientHeight) h = wnd.document.documentElement.clientHeight;else if (wnd.document.body.clientHeight) h = wnd.dedocument.body.clientHeight;}
if (this.oldClientSize.w > 0 && this.oldClientSize.h > 0 && (this.oldClientSize.w != w || this.oldClientSize.h != h)) {
this.oldClientSize.w = w;this.oldClientSize.h = h;this.resizePlayer(w, h);}
this.oldClientSize.w = w;this.oldClientSize.h = h;wnd.scrollTo(0,0);}
if (this.infoGfxFadestep > 0) {
this.infoGfxFadestep -= 5;this.infoGfx.setAlpha(this.infoGfxFadestep);}
if (this.targetViewmode == 'preload') {
var i, j, done = true;for (i=0; i<this.options.imageFramesY; i++) {
for (j=0; j<this.options.imageFramesX; j++) {
if (!this.preloadedImages[i+'_'+j].complete)
done = false;}
}
if (done) {
this.setViewmode('3d');if (this.options.autoPlay || this.options.autoPlayCount)
this.play();}
}
}}
this.resizePlayer = function(w, h) {
this.setSize(w,h);this.options.width = w;this.options.height = h;var o = this.options;this.menuFrame.setSize(w,this.options.menuHeight);this.menuFrame.setPos(0,h-this.options.menuHeight);this.sensor.setSize(o.width,o.height-o.menuHeight);this.viewFrame.setSize(o.width,o.height-o.menuHeight);this.custFrame.setSize(o.width,o.height-o.menuHeight);this.imageGrid.setSize(o.imageWidth*(o.height-o.menuHeight)/o.imageHeight, o.height-o.menuHeight);this.imageGrid.iw = this.zoomImage.iw = o.imageWidth*(o.height-o.menuHeight)/o.imageHeight;this.imageGrid.ih = this.zoomImage.ih = o.height-o.menuHeight;this.imageGrid.centerAt(o.width/2, (o.height-o.menuHeight)/2);this.zoomImage.setSize(o.imageWidth*(o.height-o.menuHeight)/o.imageHeight, o.height-o.menuHeight);this.initGridPos = {x:this.imageGrid.x, y:this.imageGrid.y};this.zoomImage.setPos(this.initGridPos.x, this.initGridPos.y);this.loadImage.centerAt(o.width/2, o.height/2);this.setZoom(1);this.zoomImage.setZoom(1);this.imageGrid.setZoom(1);if (this.options.fullscreen)
window.scrollTo(0,0);}
this.setFullscreen__bodyOverflow = '';this.setFullscreen__viewport = '';this.setFullscreen__scrollPos = {x:0, y:0};this.setFullscreen = function() {
if (_$tljs_6060165_isAppleIDevice()) {
var viewport = 'initial-scale=1.0,user-scalable=no';var metatags = metatags = document.getElementsByTagName("meta");var opt, done = false;for (opt in metatags) {
var tag = metatags[opt];if (tag['name'] == 'viewport') {
this.setFullscreen__viewport = tag['content'];tag['content'] = viewport;done = true;}
}
if (!done) {
var tag = _$tljs_6060165_$$('meta');tag.name = 'viewport';tag['content'] = viewport;document.getElementsByTagName('head')[0].appendChild(tag);}
}
var wnd = window;if (navigator.userAgent.indexOf('MSIE 6') == -1) {
this.setFullscreen__bodyOverflow = wnd.document.body.style.overflow;wnd.document.body.style.overflow = 'hidden';}
else {
this.setFullscreen__bodyOverflow = wnd.document.getElementsByTagName('html')[0].style.overflow;wnd.document.getElementsByTagName('html')[0].style.overflow = 'hidden';}
this.setFullscreen__scrollPos.x = (wnd.document.body.scrollLeft ? wnd.document.body.scrollLeft : wnd.document.documentElement.scrollLeft);this.setFullscreen__scrollPos.y = (wnd.document.body.scrollTop ? wnd.document.body.scrollTop : wnd.document.documentElement.scrollTop);window.scrollTo(0,0);var overwriteOptions = {
imageStartFrameX: this.frame.x,imageStartFrameY: this.frame.y,fullscreen: true,fullscreenWindow: wnd,fullscreenBasePlayer: this,autoPlayCount: false
};var newoptions = _$tljs_6060165_$clone(this.options);for (var i in overwriteOptions) {
newoptions[i] = overwriteOptions[i];}
this.fullscreenObj = new _$tljs_6060165_R3DPlayer(newoptions, this.details);}
this.unsetFullscreen = function() {
var wnd = this.options.fullscreenWindow ? this.options.fullscreenWindow : window;if (wnd != window) {
}
else {
document.body.style.overflow = this.setFullscreen__bodyOverflow;window.scrollTo(this.setFullscreen__scrollPos.x, this.setFullscreen__scrollPos.y);}
this.setFrame(this.fullscreenObj.frame.x, this.fullscreenObj.frame.y);this.setZoom(1);}
this.addDDDetail = function(detail) {
var node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(node, 'width:200px;height:80px;cursor:pointer;borderLeft:1px solid #DEDEDE;borderTop:1px solid #DEDEDE');var thumb = new _$tljs_6060165_CenterSprite(this.options.imagePath+detail[3],0,0,78,78, node);_$tljs_6060165_$style(thumb.node, 'position:static;cssFloat:left');var title = _$tljs_6060165_$$('div');title.innerHTML = detail[1];_$tljs_6060165_$style(title, 'fontSize:15px;paddingTop:5px;fontWeight:bold;fontFamily:'+this.options.fontFamily);node.appendChild(title);var text = _$tljs_6060165_$$('div');text.innerHTML = detail[2];_$tljs_6060165_$style(text, 'fontSize:10px;fontFamily:'+this.options.fontFamily);node.appendChild(text);node.onclick = _$tljs_6060165_EventHandler.singleEvent(function(ref) {
var player = ref.player;var detail = ref.detail;player.showDetail(detail);player.setViewmode('detailImage');}, {player:this, detail:detail});return node;}
this.clearCustFrame = function() {
while (this.custFrame.node.hasChildNodes()) {
this.custFrame.node.removeChild(this.custFrame.node.firstChild);}
}
this.showDetail = function(detail) {
if (detail[0] == 'image') {
this.clearCustFrame();var imgIndex = (this.options.fullscreen&&detail[5]?5:4);new _$tljs_6060165_CenterSprite(this.options.imagePath+detail[imgIndex],0,0,this.options.width,this.options.height-this.options.menuHeight,this.custFrame.node);}
}
this.options = _$tljs_6060165_$clone(_$tljs_6060165_R3DPlayer.defaultOptions);if (_$tljs_6060165_isIDevice() && !_$tljs_6060165_isAppleIpadDevice())
this.options.menuHeight *= 2;for (var i in options) {
this.options[i] = options[i];}
if (!this.options.showMenu || this.options.showMenu == 2)
this.options.menuHeight = 0;if (this.options.fullscreen) {
var w = 0, h = 0;var wnd = this.options.fullscreenWindow ? this.options.fullscreenWindow : window;if (wnd.innerWidth) w = wnd.innerWidth;else if (wnd.document.documentElement.clientWidth) w = wnd.document.documentElement.clientWidth;else if (wnd.document.body.clientWidth) w = wnd.document.body.clientWidth;if (wnd.innerHeight) h = wnd.innerHeight;else if (wnd.document.documentElement.clientHeight) h = wnd.document.documentElement.clientHeight;else if (wnd.document.body.clientHeight) h = wnd.document.body.clientHeight;this.options.width = w;this.options.height = h;this.options.imageWidth = this.options.imageLargeWidth;this.options.imageHeight = this.options.imageLargeHeight;}
var o = this.options;this.details = details;this.frame = {x:o.imageStartFrameX, y:o.imageStartFrameY};this.zoomPos = {x:0, y:0};this.zoom = 1;if (this.options.autoPlayCount) {
this.autoPlayCountTarget = this.frame.x;}
this.viewmode = 'preload'; // current viewmode
this.viewmodeAlphaStep = 0; // value 0-100 = fade out | 100-200 fade in
this.prevViewmode = 'preload'; // prev viewmode
this.targetViewmode = 'preload'; // next viewmode to fade onto
this.preloadedImages = {};var i, j, k;for (i=0; i<this.options.imageFramesY; i++) {
for (j=0; j<this.options.imageFramesX; j++) {
k = new Image();k.src = this.options.imagePath+'small_'+i+'_'+j+'.jpg';this.preloadedImages[i+'_'+j] = k;}
}
this.autoPlay = false;this.autoPlayDelay = 0;this.interact = {
'pos':{x:0,y:0},'offset':{x:0,y:0},'moveOffset':0,'move':false
};this.node = _$tljs_6060165_$$('div');this.sensor = new _$tljs_6060165_SensorLayer(0,0,o.width,o.height-o.menuHeight, o.gfxPath+'blank.gif',this.node);this.sensor.setZ(10);this.sensor.node.style.cursor = 'pointer';this.fullscreenObj = null;this.viewFrame = new _$tljs_6060165_Frame(0,0,o.width,o.height-o.menuHeight,this.node);this.viewFrame.setZ(1);this.viewFrame.hide();this.custFrame = new _$tljs_6060165_Frame(0,0,o.width,o.height-o.menuHeight,this.node);this.custFrame.setZ(1);this.custFrame.hide();if (o.fullscreen)
this.imageGrid = new _$tljs_6060165_SpriteGrid(o.imagePath, 0, 0, o.imageWidth*(o.height-o.menuHeight)/o.imageHeight, o.height-o.menuHeight, 0, 0, o.imageFramesX, o.imageFramesY, this.viewFrame.node);else
this.imageGrid = new _$tljs_6060165_SpriteGrid(o.imagePath, 0, 0, o.imageWidth, o.imageHeight, 0, 0, o.imageFramesX, o.imageFramesY, this.viewFrame.node);this.imageGrid.setZ(2);this.imageGrid.centerAt(o.width/2, (o.height-o.menuHeight)/2);if (o.fullscreen)
this.zoomImage = new _$tljs_6060165_Sprite(o.gfxPath+'blank.gif', 0, 0, o.imageWidth*(o.height-o.menuHeight)/o.imageHeight, o.height-o.menuHeight, 0, this.viewFrame.node);else
this.zoomImage = new _$tljs_6060165_Sprite(o.gfxPath+'blank.gif', 0, 0, o.imageWidth, o.imageHeight, 0, this.viewFrame.node);this.zoomImage.setZ(3);if (o.productLogo)
this.logoImage = new _$tljs_6060165_Sprite(o.imagePath+'logo.'+(navigator.userAgent.indexOf('MSIE 6')==-1?'png':'gif'), 20, 20, -1, -1, 100, this.viewFrame.node);else
this.logoImage = new _$tljs_6060165_Sprite(o.gfxPath+'logo.'+(navigator.userAgent.indexOf('MSIE 6')==-1?'png':'gif'), 20, 20, -1, -1, 100, this.viewFrame.node);if (o.fullscreen)
this.logoImage.hide();this.logoImage.setZ(9);this.zoomTimer = new _$tljs_6060165_Timer(_$tljs_6060165_EventHandler.singleEvent(function (ref, obj, evt) {
ref.zoomImage.setImg(ref.options.imagePath+'large_'+ref.frame.y+'_'+ref.frame.x+'.jpg');}, this));this.loadImage = new _$tljs_6060165_Sprite(o.gfxPath+'ajax-loader.gif', 0, 0, 100, 100, 100, this.node);this.loadImage.centerAt(this.options.width/2, this.options.height/2);this.menuFrame = new _$tljs_6060165_Frame(0, o.height-o.menuHeight, o.width, o.menuHeight, this.node);this.mBar = new _$tljs_6060165_Sprite(o.gfxPath+'bar.gif',0,0,4000,o.menuHeight,100,this.menuFrame.node);this.mBar.setZ(0);this.infoGfxFadestep = 0;this.infoGfx = new _$tljs_6060165_Sprite('http://360api.de/api/gfx/info_'+(o.imageFramesY==1?'360':'3d')+'.png', 10, 10, 70, 45, 100, this.node);this.infoGfx.setXAlign('right');this.infoGfx.setZ(9);if (!o.showInfo)
this.infoGfx.hide();if (this.options.allowAutoPlay) {
if (o.showMenu == 2) {
this.mbPlay = new _$tljs_6060165_GfxButton(24,24+(o.allowFullscreen&&!o.fullscreen?36:0),o.menuHeight,o.menuHeight,o.gfxPath+'play.gif',o.gfxPath+'active/play.gif','Abspielen',this.node);this.mbPlay.setXAlign('right');this.mbPlay.setYAlign('bottom');this.mbPlay.setZ(11);}
else
this.mbPlay = new _$tljs_6060165_GfxButton(20,0,o.menuHeight,o.menuHeight,o.gfxPath+'play.gif',o.gfxPath+'active/play.gif','Abspielen',this.menuFrame.node);this.mbPlay.mouseClickHandler.add(function (ref) {
ref.play();ref.setViewmode('3d');}, this);if (o.showMenu == 2) {
this.mbPause = new _$tljs_6060165_GfxButton(24,24+(o.allowFullscreen&&!o.fullscreen?36:0),o.menuHeight,o.menuHeight,o.gfxPath+'pause.gif',o.gfxPath+'active/pause.gif','Pause / Stopp',this.node);this.mbPause.setXAlign('right');this.mbPause.setYAlign('bottom');this.mbPause.setZ(11);}
else
this.mbPause = new _$tljs_6060165_GfxButton(20,0,o.menuHeight,o.menuHeight,o.gfxPath+'pause.gif',o.gfxPath+'active/pause.gif','Pause / Stopp',this.menuFrame.node);this.mbPause.mouseClickHandler.add(function (ref) {
ref.pause();ref.setViewmode('3d');}, this);this.mbPause.hide();}
var unt = o.menuHeight;this.mb360 = new _$tljs_6060165_GfxButton(20,0,unt,unt,o.gfxPath+'360.gif',o.gfxPath+'active/360.gif','Zurück zur 3D-Ansicht',this.menuFrame.node);this.mb360.setXAlign('right');this.mb360.mouseClickHandler.add(function (ref) {
ref.setViewmode('3d');}, this);this.mb360.hide();if (this.details.length && !this.options.fullscreen) {
this.mbDetail = new _$tljs_6060165_GfxButton(20,0,unt,unt,o.gfxPath+'details.gif',o.gfxPath+'active/details.gif','Details anzeigen',this.menuFrame.node);this.mbDetail.setXAlign('right');this.mbDetail.mouseClickHandler.add(function (ref) {
if (ref.ddDetail.visible)
ref.ddDetail.hide();else
ref.ddDetail.show();}, this);this.ddDetail = new _$tljs_6060165_Frame(0,o.menuHeight,200,70, this.node);this.ddDetail.setAlign('right', 'bottom');_$tljs_6060165_$style(this.ddDetail.node, 'backgroundColor:#FFFFFF');this.ddDetail.hide();this.ddDetail.setZ(11);for (var i=0; i<this.details.length; i++) {
this.ddDetail.node.appendChild(this.addDDDetail(this.details[i]));}
this.ddDetail.setSize(this.ddDetail.w, this.details.length*80);}
if (!this.options.fullscreen) {
var offset = (this.details.length ? unt : 0) + 24;if (this.options.allowZoom) {
this.mbZoomIn = new _$tljs_6060165_GfxButton(offset+unt*2,0,unt,unt,o.gfxPath+'zoom_in.gif',o.gfxPath+'active/zoom_in.gif','Hineinzoomen',this.menuFrame.node);this.mbZoomIn.setXAlign('right');this.mbZoomIn.mouseClickHandler.add(function (ref) {
ref.setZoom(ref.zoom*1.2);ref.setViewmode('3d');}, this);this.mbZoomOut = new _$tljs_6060165_GfxButton(offset+unt,0,unt,unt,o.gfxPath+'zoom_out.gif',o.gfxPath+'active/zoom_out.gif','Herauszoomen',this.menuFrame.node);this.mbZoomOut.setXAlign('right');this.mbZoomOut.mouseClickHandler.add(function (ref) {
ref.setZoom(ref.zoom/1.2);ref.setViewmode('3d');}, this);}
if (this.options.allowFullscreen && !_$tljs_6060165_isAndroidIDevice()) {
if (o.showMenu == 2) {
this.mbFullscreen = new _$tljs_6060165_GfxButton(24,24,unt,unt,o.gfxPath+'fullscreen.gif',o.gfxPath+'active/fullscreen.gif','Vollbildmodus',this.node);this.mbFullscreen.setXAlign('right');this.mbFullscreen.setYAlign('bottom');this.mbFullscreen.setZ(11);}
else
this.mbFullscreen = new _$tljs_6060165_GfxButton(offset,0,unt,unt,o.gfxPath+'fullscreen.gif',o.gfxPath+'active/fullscreen.gif','Vollbildmodus',this.menuFrame.node);this.mbFullscreen.setXAlign('right');this.mbFullscreen.mouseClickHandler.add(function (ref) {
ref.setFullscreen();}, this);}
}
this.zoomImage.node.onload = _$tljs_6060165_EventHandler.singleEvent(function (ref, obj, evt) {
if (ref.zoom != 1 || ref.options.fullscreen)
ref.zoomImage.setAlpha(100);}, this)
this.initGridPos = {x:this.imageGrid.x, y:this.imageGrid.y};this.zoomImage.setPos(this.initGridPos.x, this.initGridPos.y);_$tljs_6060165_$style(this.node, 'backgroundColor:#'+o.backgroundColor+';border:'+o.border+'px solid #'+o.borderColor+'');if (o.backgroundImage)
_$tljs_6060165_$style(this.node, 'backgroundImage:url('+o.backgroundImage+')');if (!o.fullscreen) {
var id = _$tljsG_R3DPlayer_id++;if (replaceNode) {
var curNode = _$tljs_6060165_$$('div');curNode.id = 'R3DPlayer_id_'+id;replaceNode.parentNode.replaceChild(curNode, replaceNode);}
else
document.write('<div id="R3DPlayer_id_'+id+'"></div>');this.placeNode(0, 0, o.width, o.height, _$tljs_6060165__('R3DPlayer_id_'+id));}
else
this.placeNode(0, 0, o.width, o.height, o.fullscreenWindow.document.body);this.setFrame(this.frame.x, this.frame.y, true);if (!o.fullscreen)
_$tljs_6060165_$style(this.node, 'position:relative;');if (o.fullscreen) {
if (_$tljs_6060165_isAndroidIDevice())
_$tljs_6060165_$style(this.node, 'position:fixed');_$tljs_6060165_$style(this.node, 'zIndex:10000');this.closeButton = new _$tljs_6060165_GfxButton(10,10,48,48,o.gfxPath+'close.gif',o.gfxPath+'close.gif','Vollbildmodus verlassen',this.node);_$tljs_6060165_$style(this.closeButton.node, 'zIndex:10000');this.closeButton.mouseClickHandler.add(function(ref, obj, evt){
ref.options.fullscreenBasePlayer.unsetFullscreen();ref.options.active = false;document.body.removeChild(ref.node);if (_$tljs_6060165_isAppleIDevice()) {
var metatags = metatags = document.getElementsByTagName("meta");var opt;for (opt in metatags) {
var tag = metatags[opt];if (tag['name'] == 'viewport') {
var view = ref.setFullscreen__viewport;if (!view)
view = 'user-scalable=yes';else if (view.indexOf('user-scalable') == -1)
view += ',user-scalable=yes';tag['content'] = view;}
}
}
_$tljs_6060165_dropObjectEvent(document, (_$tljs_6060165_isIDevice()?'touchmove':'mousemove'), this.globalMouseMoveHandlerRegCallback);_$tljs_6060165_dropObjectEvent(document, (_$tljs_6060165_isIDevice()?'touchend':'mouseup'), this.globalMouseUpHandlerRegCallback);}, this);}
window.setInterval(_$tljs_6060165_EventHandler.singleEvent(function(ref, obj, evt) {
ref.viewmodeStepper();}, this), 50);this.sensor.mouseDownHandler.add(function(ref, obj, evt) {
if (navigator.userAgent.indexOf('Android')>=0)
evt.preventDefault();var touchCount = _$tljs_6060165_countIDeviceTouches();if (touchCount == 1 && _$tljs_6060165_isIDevice())
evt.preventDefault();if (ref.viewmode == 'detailImage') {
ref.setViewmode('3d');}
else {
ref.interact.move = true;ref.interact.pos = _$tljs_6060165_getPos(evt);ref.interact.relpos = _$tljs_6060165_getRelPos(evt);ref.interact.offset.x = 0;ref.interact.offset.y = 0;ref.pause()
}
}, this);var doc = this.options.fullscreenWindow ? this.options.fullscreenWindow.document : document;this.globalMouseMoveHandler = new _$tljs_6060165_EventHandler(_$tljs_6060165_isIDevice() ? true : false);this.globalMouseMoveHandlerRegCallback = this.globalMouseMoveHandler.getCallback();_$tljs_6060165_registerObjectEvent(doc, (_$tljs_6060165_isIDevice()?'touchmove':'mousemove'), this.globalMouseMoveHandlerRegCallback);this.globalMouseMoveHandler.add(function(ref, obj, evt) {
var touchCount = _$tljs_6060165_countIDeviceTouches();if (ref.interact.move && (touchCount == 1 || !_$tljs_6060165_isIDevice())) {
if (evt.preventDefault)
evt.preventDefault();else
evt.returnValue = false;}
var pos = _$tljs_6060165_getPos(evt);var relpos = _$tljs_6060165_getRelPos(evt);if (ref.interact.moveOffset > -50 && !ref.interact.move)
ref.interact.moveOffset--;if (ref.interact.move && ref.viewmode == '3d') {
var oldPos = ref.interact.pos;ref.interact.offset.x += pos.x - oldPos.x;ref.interact.offset.y += pos.y - oldPos.y;if (ref.zoom != 1) {
if (ref.interact.offset.x || ref.interact.offset.y) {
var move = ref.moveZoom(ref.interact.offset.x, ref.interact.offset.y);var dist = Math.round(Math.sqrt(ref.interact.offset.x*ref.interact.offset.x + ref.interact.offset.y*ref.interact.offset.y));ref.interact.offset.x = 0;ref.interact.offset.y = 0;if (!move) {
ref.interact.moveOffset += dist;while (ref.interact.moveOffset >= 5) {
ref.interact.moveOffset -= 5;ref.setZoom(ref.zoom/1.005);}
}
}
}
else {
var offX = 0, offY = 0;while (ref.interact.offset.x > 20) {
ref.interact.offset.x -= 20;offX = -1;}
while (ref.interact.offset.x < -20) {
ref.interact.offset.x += 20;offX = 1;}
while (ref.interact.offset.y > 30) {
ref.interact.offset.y -= 30;offY = 1;}
while (ref.interact.offset.y < -30) {
ref.interact.offset.y += 30;offY = -1;}
ref.offsetFrame(offX, offY);if ((offX || offY) && ref.options.showInfo) {
ref.infoGfxFadestep = 100;ref.options.showInfo = false;}
if (ref.options.autoPlayCount && (offX || offY)) {
ref.options.autoPlayCount = 0;}
}
}
/*
else if (ref.interact.move && ref.viewmode == '3d') {
}
*/
ref.interact.pos = pos;ref.interact.relpos = relpos;}, this);var doc = this.options.fullscreenWindow ? this.options.fullscreenWindow.document : document;this.globalMouseUpHandler = new _$tljs_6060165_EventHandler(_$tljs_6060165_isIDevice() ? true : false);this.globalMouseUpHandlerRegCallback = this.globalMouseUpHandler.getCallback();_$tljs_6060165_registerObjectEvent(doc, (_$tljs_6060165_isIDevice()?'touchend':'mouseup'), this.globalMouseUpHandlerRegCallback);this.globalMouseUpHandler.add(function(ref, obj, evt) {
var touchCount = _$tljs_6060165_countIDeviceTouches();if (ref.interact.move && (touchCount == 1 || !_$tljs_6060165_isIDevice())) {
if (evt.preventDefault)
evt.preventDefault();else
evt.returnValue = false;}
ref.interact.move = false;ref.interact.offset.x = ref.interact.offset.y = 0;}, this);if (this.options.allowZoom) {
this.sensor.mouseScrollHandler.add(function(ref, obj, evt) {
var oldZoom = ref.zoom;var newZoom = 0;if (evt.scrollUp)
newZoom = oldZoom * 1.1;else
newZoom = oldZoom / 1.1;ref.setZoom(newZoom, ref.interact.relpos.x, ref.interact.relpos.y);}, this);}
if (!this.options.fullscreen && this.options.apiObj) {
var obj = {};obj.__obj = this;obj.setFrame = function(x,y) {
this.__obj.setFrame(x,y);}
obj.loadPlayer = function(cust, product) {
_$tljs_6060165_load('http://dev.360api.de/config/'+cust+'/'+product+'.js', _$tljs_6060165_EventHandler.singleEvent(function (ref) {
var response = window.__360api_ajax__;var options = ref.__obj.options;var o = response.config;var k;var keys = ['imageWidth','imageHeight','imageLargeWidth','imageLargeHeight','imageFramesX','imageFramesY','imageStartFrameX','imageStartFrameY','backgroundColor','backgroundImage','productLogo','imagePath'];for (k in keys)
if (typeof o[keys[k]] != 'undefined')
options[keys[k]] = o[keys[k]];if (!o['backgroundColor'])
options['backgroundColor'] = '#FFFFFF';_$tljs_6060165_R3DPlayer(options, response.detail, ref.__obj.node);}, obj));/*
var aj = (window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"));aj.onreadystatechange = _$tljs_6060165_EventHandler.singleEvent(function (ref) {
if (aj.readyState==4) {
var response = eval('('+aj.responseText+')');var options = ref.__obj.options;var o = response.config;var k;var keys = ['imageWidth','imageHeight','imageLargeWidth','imageLargeHeight','imageFramesX','imageFramesY','imageStartFrameX','imageStartFrameY','backgroundColor','backgroundImage','productLogo','imagePath'];for (k in keys)
if (typeof o[keys[k]] != 'undefined')
options[keys[k]] = o[keys[k]];_$tljs_6060165_R3DPlayer(options, response.detail, ref.__obj.node);}
}, obj);aj.open('GET', 'http://dev.360api.de/config/'+cust+'/'+product+'.json', true);aj.send();*/
}
window[this.options.apiObj] = obj;}
}
if (typeof _$tljsG_R3DPlayer_id == 'undefined')
var _$tljsG_R3DPlayer_id = 0;_$tljs_6060165_R3DPlayer.defaultOptions = {
apiObj: '',width: 640,height: 480,gfxPath: 'gfx/',imageWidth: 320,imageHeight: 240,imageLargeWidth: 640,imageLargeHeight: 480,imagePath: 'img/',imageFramesX: 16,imageFramesY: 1,imageStartFrameX: 5,imageStartFrameY: 1,menuHeight: 24,fontFamily: 'Arial',border: 1,borderColor: 'DEDEDE',backgroundColor: 'FFFFFF',backgroundImage: '',allowRotation: true,autoPlay: false,autoPlayCount: 1,fullscreen: false,fullscreenWindow: false,fullscreenBasePlayer: null,productLogo: false,showMenu: true,showInfo: true,allowFullscreen: true,allowZoom: true,allowAutoPlay: true,active: true
}

function _$tljs_6060165_SensorLayer(x, y, w, h, blankGfx, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(this.node, 'backgroundImage:url('+blankGfx+')');this.mouseDownHandler = new _$tljs_6060165_EventHandler(_$tljs_6060165_isIDevice() ? true : false);this.mouseUpHandler = new _$tljs_6060165_EventHandler(_$tljs_6060165_isIDevice() ? true : false);this.mouseMoveHandler = new _$tljs_6060165_EventHandler(_$tljs_6060165_isIDevice() ? true : false);this.mouseClickHandler = new _$tljs_6060165_EventHandler(false);this.mouseScrollHandler = new _$tljs_6060165_EventHandler(false);/*
this.mouseDownHandler.add(function (ref, obj, evt) {
alert('y');});*/
this.node.__scrollHandlerCb = this.mouseScrollHandler.getCallback();var self = this;this.scrollCallback = function(e) {
var event = e?e:window.event;try { event.preventDefault(); } catch (ex) {}
var scrollDown = ((event.wheelDelta?event.wheelDelta:-event.detail)<0);event.scrollUp = !scrollDown;event.scrollDown = scrollDown;return self.node.__scrollHandlerCb(event);}
if (window.addEventListener)
this.node.addEventListener('DOMMouseScroll', this.scrollCallback, false);this.node.onmousewheel = this.scrollCallback;if (_$tljs_6060165_isIDevice()) {
this.node.ontouchstart = this.mouseDownHandler.getCallback();this.node.ontouchend = this.mouseUpHandler.getCallback();this.node.ontouchmove = this.mouseMoveHandler.getCallback();}
else {
this.node.onmousedown = this.mouseDownHandler.getCallback();this.node.onmouseup = this.mouseUpHandler.getCallback();this.node.onmousemove = this.mouseMoveHandler.getCallback();}
this.node.onclick = this.mouseClickHandler.getCallback();this.placeNode(x, y, w, h, parentNode);}

function _$tljs_6060165_Sprite(img, x, y, w, h, alpha, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.setImg = function(img) {
this.img = img;this.node.src = img;}
this.setAlpha = function(alpha) {
this.alpha = alpha;_$tljs_6060165_$alpha(this.node, alpha);}
this.setZoom = function(zoom) {
this.zoom = zoom;this.setSize(this.iw*zoom, this.ih*zoom);}
this.img = img;this.node = _$tljs_6060165_$$('img');this.node.src = img;this.zoom = 1;this.iw = w;this.ih = h;this.alpha = (typeof alpha == 'undefined'?100:alpha);_$tljs_6060165_$alpha(this.node, this.alpha);this.placeNode(x,y,w,h,parentNode);}

function _$tljs_6060165_SpriteGrid(img, x, y, w, h, cx, cy, gw, gh, parentNode) {
_$tljs_6060165_$extends(this, _$tljs_6060165_NodeObjExtender);this.setCell = function(x, y) {
if (x < 0) x = 0;if (x >= gw) x = gw-1;if (y < 0) y = 0;if (y >= gh) y = gh-1;this.cx = x;this.cy = y;this.sprite.setImg(this.img+'small_'+y+'_'+x+'.jpg');}
this.setZoom = function(zoom) {
this.zoom = zoom;this.setSize(this.iw*zoom, this.ih*zoom);this.sprite.setSize(this.iw*zoom, this.ih*zoom);}
this.cx = cx;this.cy = cy;this.iw = w;this.ih = h;this.gw = gw;this.gh = gh;this.zoom = 1;this.img = img;this.imgArr = {};var i, j, k;for (i=0; i<gh; i++) {
for (j=0; j<gw; j++) {
k = new Image();k.src = img+'small_'+i+'_'+j+'.jpg';this.imgArr[i+'_'+j] = k;}
}
this.node = _$tljs_6060165_$$('div');_$tljs_6060165_$style(this.node, 'overflow:hidden');this.sprite = new _$tljs_6060165_Sprite(img+'small_'+y+'_'+x+'.jpg', 0, 0, this.iw, this.ih, 100, this.node);this.placeNode(x, y, w, h, parentNode);}

function _$tljs_6060165_Timer(func, delay, interval) {
this.step = function () {
var run = false;if (this.delay == 0)
run = true;if (this.delay >= 0)
this.delay -= 1;if (run)
this.func();}
this.secToSteps = function(sec) {
return Math.round(1000/this.interval*sec);}
this.setDelay = function(sec) {
this.delay = this.secToSteps(sec);}
this.cancel = function() {
this.delay = -1;}
this.destroy = function() {
window.clearInterval(this.intervalRef);_$tljs_6060165_Timer.list[this.id] = null;}
_$tljs_6060165_Timer.list[_$tljs_6060165_Timer.id] = this;this.id = _$tljs_6060165_Timer.id++;this.func = func;this.interval = (interval ? interval : 20);this.delay = (delay ? delay : -1);this.intervalRef = window.setInterval('_$tljs_6060165_Timer.list['+this.id+'].step();', this.interval);}
_$tljs_6060165_Timer.id = 0;_$tljs_6060165_Timer.list = [];
function _$tljs_6060165__(str) {return document.getElementById(str);}
function _$tljs_6060165_$$(str) {return document.createElement(str);}
function _$tljs_6060165_$_(str) {return document.createTextNode(str);}
function _$tljs_6060165_$style(obj, style) {
style = style.split(';');for (var i=0; i<style.length; i++) {
if (style[i].indexOf(':') != -1) {
var pair = [style[i].substr(0,style[i].indexOf(':')),style[i].substr(style[i].indexOf(':')+1,style[i].length)];if (obj.style[_$tljs_6060165_trim(pair[0])] != _$tljs_6060165_trim(pair[1])) {
obj.style[_$tljs_6060165_trim(pair[0])] = _$tljs_6060165_trim(pair[1]);}
}
}
}
function _$tljs_6060165_$alpha(id, alpha) {
var obj = (typeof id != 'object' ? document.getElementById(id) : id);alpha = Math.round(alpha);if (alpha == 0) {
obj.style.display = 'none';alpha = 100;}
else
obj.style.display = 'block';var tval = '';tval = 'alpha(opacity='+alpha+')';if (navigator.userAgent.indexOf('MSIE 6')!=-1 && obj.style.filter != tval)
obj.style.filter = tval;tval = (alpha==100?'1':'.'+(alpha<10?'0':'')+alpha);if (tval != obj.style.MozOpacity)
obj.style.MozOpacity = tval;if (tval != obj.style.opacity)
obj.style.opacity = tval;}
function _$tljs_6060165_$extends(obj, extender) {
var constructor = (typeof extender.__constructor != 'undefined');for (var prop in extender) {
if (typeof obj[prop] == 'undefined') {
obj[prop] = extender[prop];}
}
if (constructor)
obj.__constructor();}
function _$tljs_6060165_$clone(obj) {
var target = {};var i;for (i in obj) {
var type = typeof obj[i];if (type == 'boolean')
target[i] = (obj[i]?true:false);else if (type == 'string')
target[i] = obj[i]+'';else if (type == 'number')
target[i] = obj[i]*1;else
target[i] = obj[i];}
return target;}
function _$tljs_6060165_trim(str) {
while (str.length && (str.indexOf("\n")==0 || str.indexOf("\r")==0 || str.indexOf("\t")==0 || str.indexOf(' ')==0))
str = str.substring(1, str.length);while (str.length && (str.lastIndexOf("\n")==str.length-1 || str.lastIndexOf("\r")==str.length-1 || str.lastIndexOf("\t")==str.length-1 || str.lastIndexOf(' ')==str.length-1))
str = str.substring(0, str.length-1);return str;}
function _$tljs_6060165_getPos(e) {
var x, y;if (_$tljs_6060165_isIDevice()) {
x = e.touches[0].pageX;y = e.touches[0].pageY;}
else if (document.all || window.opera) {
x = e.clientX + document.body.scrollLeft;y = e.clientY + document.body.scrollTop;} else {
x = e.pageX;y = e.pageY;}
return {x:x,y:y};}
function _$tljs_6060165_getRelPos(e) {
var x, y;if (_$tljs_6060165_isIDevice()) {
x = e.touches[0].pageX;y = e.touches[0].pageY;}
else if (document.all || window.opera) {
x = e.offsetX;y = e.offsetY;} else {
x = e.layerX;y = e.layerY;}
return {x:x,y:y};}
function _$tljs_6060165_roundd(num, precision) {
var factor = Math.pow(10, precision);return Math.round(num*factor)/factor;}
function _$tljs_6060165_isIDevice() {
if (navigator.userAgent.indexOf('Android')>=0 || navigator.userAgent.indexOf('iPad')>=0 || navigator.userAgent.indexOf('iPod')>=0 || navigator.userAgent.indexOf('iPhone')>=0)
return true;return false;}
function _$tljs_6060165_isAppleIDevice() {
if (navigator.userAgent.indexOf('iPad')>=0 || navigator.userAgent.indexOf('iPod')>=0 || navigator.userAgent.indexOf('iPhone')>=0)
return true;return false;}
function _$tljs_6060165_isAppleIpadDevice() {
if (navigator.userAgent.indexOf('iPad')>=0)
return true;return false;}
function _$tljs_6060165_isAndroidIDevice() {
if (navigator.userAgent.indexOf('Android')>=0)
return true;return false;}
function _$tljs_6060165_countIDeviceTouches() {
if (!_$tljs_6060165_isIDevice())
return 0;if (navigator.userAgent.indexOf('Android')>=0)
return 1;var c = 0;var x,y;for (var touch in event.touches) {
x = event.touches[touch].pageX;y = event.touches[touch].pageY;if (x || y)
c++;}
return c;}
function _$tljs_6060165_registerObjectEvent(obj, name, func) {
try {
obj.addEventListener(name,func,false);} catch (e) {}
try {
obj.attachEvent('on'+name,func);} catch (e) {}
}
function _$tljs_6060165_dropObjectEvent(obj, name, func) {
try {
obj.removeEventListener(name,func,false);} catch (e) {}
try {
obj.detachEvent('on'+name,func);} catch (e) {}
}
function _$tljs_6060165_pageDbg(s, x, y) {
if (!x) x = '0';if (!y) y = '0';var id = '_tljs_dbg_'+x+'_'+y;var obj = _$tljs_6060165__(id);if (!obj) {
obj = _$tljs_6060165_$$('div');obj.id = id;_$tljs_6060165_$style(obj, 'position:absolute;zIndex:64000;left:'+x+'px;top:'+y+'px');document.getElementsByTagName('body')[0].appendChild(obj);}
obj.innerHTML = s;}
function _$tljs_6060165_load(url, cb) {
var node = _$tljs_6060165_$$('script');node.onload = cb;node.type = 'text/javascript';node.src = url;var head = document.getElementsByTagName('head')[0];head.appendChild(node);}}
var _$tljs_6060165_cconfig = {width:550,height:400,imageFramesX:16,imageFramesY:1,imageStartFrameX:4,imageStartFrameY:0,imageWidth:550,imageHeight:360,imageLargeWidth:2000,imageLargeHeight:1308,gfxPath:'http://360api.de/api/317261/gfx/',imagePath:'http://360api.de/api/317261/11369/'}
;
new _$tljs_6060165_R3DPlayer(_$tljs_6060165_cconfig,[]);
