
function open_technology_popup(id)
{
	wnd = window.open("technology_popup.php?id_technology="+id, "", "width=422,height=500,scrollbars=yes");
	wnd.focus();
}

function popup_skill_level(id_product)
{
	wnd = window.open("popup.php?page_id=1103", "", "width=400,height=400,scrollbars=no");
	wnd.focus();
}

function popup_target_group(id_product)
{
	wnd = window.open("target_group.php?id_product="+id_product, "", "width=422,height=430,scrollbars=yes");
	wnd.focus();
}

function popup_stringing_guide(id_product)
{
	wnd = window.open("stringing.php?id_product="+id_product, "", "width=285,height=350,scrollbars=yes");
	wnd.focus();
}

function popup_nordic_racing_athlet_card(id_athlet)
{
	wnd = window.open("card_v2.php?id_athlet="+id_athlet, "", "width=830,height=660,scrollbars=no");
	wnd.focus();
}

function popup_alpine_racing_athlet_card(id_athlet)
{
	wnd = window.open("card_v3.php?id_athlet="+id_athlet, "", "width=600,height=430,scrollbars=no");
	wnd.focus();
}

function popup_alpine_racing_videos()
{
	wnd = window.open("videos_popup.php", "", "width=700,height=428,scrollbars=no");
	wnd.focus();
}

function popup_alpine_racing_xnx_videos()
{
	var url;
	
	if (site_id == 1)
		url = 'http://ski.contentforsports.de/external.php?folder=1565';
	else
		url = 'http://ski.contentforsports.de/external.php?folder=1484';
	
	/*
	if (site_id == 1)
		url = '/en/alpine_racing/interviews_comming_soon.php';
	else
		url = '/de/alpine_racing/interviews_comming_soon.php';
	*/
	
	wnd = window.open(url, "", "width=827,height=435,scrollbars=no");
	wnd.focus();
}

function popup_skicross_athlet_card(id_athlet)
{
	wnd = window.open("card.php?id_athlete="+id_athlet, "", "width=600,height=430,scrollbars=no");
	wnd.focus();
}

function popup_freeski_videos()
{
	wnd = window.open("videos_popup.php", "", "width=630,height=390,scrollbars=no");
	wnd.focus();
}


function popup_video(name)
{
	var ret = name.match(/_real$/i);
	
	var popup_params = '';
	if (ret != null)
	{
		popup_params = "width=660,height=504,scrollbars=no";
	}
	else
	{
		popup_params = "width=660,height=424,scrollbars=no";
	}
	wnd = window.open("video_popup.php?video="+escape(name), "video_popup", popup_params);
	wnd.focus();
}









// SCROLLER:



function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser();
 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown()
{
	if (this.y > -this.scrollHeight+this.objContainer.clipHeight)
	{ 
	    this.MoveArea(0,this.y-this.move_step);
	    if(this.loop)
	    	setTimeout(this.obj+".down()",this.speed);
	} 
} 
function MoveAreaUp()
{
	if(this.y < 0)
	{ 
    	this.MoveArea(0,this.y+this.move_step);
    	if(this.loop)
    		setTimeout(this.obj+".up()",this.speed);
	} 
} 
 
function startScroll(container_name, up_down)
{ 
	var objScroller = myScrollers[container_name];

	if (objScroller == null)
		return;
	
	if(initialised)
	{
		objScroller.loop = true; 
		if(up_down == 'up')
			objScroller.up();
		else
			objScroller.down();
	} 
} 
 
function stopScroll(container_name)
{ 
	var objScroller = myScrollers[container_name];
	
	if (objScroller == null)
		return;

    objScroller.loop=false;
    if(objScroller.timer)
    	clearTimeout(objScroller.timer);
} 
var initialised; 

var myScrollers = Object();

function initScroller(container_name, speed, move_step)
{
	var objScroller;
	var objContainer;
	
	if (!container_name)
		container_name = 'divContainer';
	if (!speed)
		speed = 15;
	if (!move_step)
		move_step = 5;
	
    objContainer=new ConstructObject(container_name);
    if (MM_findObj('divScrollContent'))
    	objScroller=new ConstructObject('divScrollContent', container_name);
    else
    	objScroller=new ConstructObject('divContent', container_name);
    
    objContainer.css.visibility='visible';

    objScroller.MoveArea(0,0);
    objScroller.objContainer = objContainer;
    objScroller.timer = null;
    objScroller.speed = speed;
    objScroller.move_step = move_step;
    
    
    initialised=true;
    
    myScrollers[container_name] = objScroller;
} 
