fr = new Object();
fr.scroll_length=142;
fr.content_length = 0;
fr.hidden_part_of_content_length=0;
fr.step=3;
fr.timer_id=0;
fr.x_start=0;
fr.x_current=0;
fr.cursor_over_left = "default";
fr.cursor_over_right = "pointer";

function scrollFrame(direction){
	var self = parent.examples;
	var a = document.getElementById("examples");
	var nuber_of_elements = null;
	try{
		nuber_of_elements = self.getElementsByTagName('img').length;
		//alert(nuber_of_elements);
		if(!nuber_of_elements) throw new Error();
	} catch(er){ nuber_of_elements = self.document.all.tags('img').length; }
	fr.content_length = fr.scroll_length*nuber_of_elements;
	fr.hidden_part_of_content_length = fr.content_length - parseInt(a.width);
	if(fr.timer_id){
		if(direction>0){
			if(fr.hidden_part_of_content_length>0) fr.cursor_over_left = "pointer";
			if(fr.x_current >= fr.x_start+fr.scroll_length || fr.x_start >= fr.hidden_part_of_content_length){
				stopScroll();
				if(fr.x_start >= fr.hidden_part_of_content_length){
					fr.cursor_over_right = "default";
					cursorRightButton(true);
				}
			} else{
				fr.x_current += fr.step*direction;
				self.scrollBy((fr.step*direction),0);
			}
		} else{
			if(fr.hidden_part_of_content_length>0) fr.cursor_over_right = "pointer";
			if(fr.x_current <= fr.x_start-fr.scroll_length || fr.x_start == 0){
				stopScroll(fr.x_start == 0);
				if(fr.x_start == 0){
					fr.cursor_over_left = "default";
					cursorLeftButton(true);
				}
			} else{
				fr.x_current += fr.step*direction;
				self.scrollBy((fr.step*direction),0);
			}
		}
	} else{
		fr.timer_id = window.setInterval('scrollFrame('+direction+');',2);
	}
}
function stopScroll(){
	window.clearInterval(fr.timer_id);
	fr.x_start = fr.x_current;
	fr.timer_id = 0;
}
function cursorLeftButton(action){
	var self = document.getElementById("left_button");
	if(action) self.style.cursor = fr.cursor_over_left;
	else self.style.cursor = "default";
}
function cursorRightButton(action){
	var self = document.getElementById("right_button");
	if(action) self.style.cursor = fr.cursor_over_right;
	else self.style.cursor = "default";
}
function setFrameDocumentPosition(){
	//parent.examples.scroll(0,0);
}
function impr(lan){
var i;
if (lan=="e"){i="imp_e.htm"}else{i="imp.htm"}
imp1=window.open(i,"imp","top=0,left=0,width=450,height=450,scrollbars=1,resizable=1")
imp1.focus()
}
function impressum(lan){
var i;
if (lan=="e"){i="impressum_e.htm"}else{i="impressum.htm"}
imp1=window.open(i,"imp","top=0,left=0,width=450,height=450,scrollbars=1,resizable=1")
imp1.focus()
}
function unternehmen(lan){
var i;
if (lan=="e"){i="unternehmen_e.asp"}else{i="unternehmen.asp"}
imp1=window.open(i,"unternehmen","top=100,left=50,width=275,height=370,scrollbars=0,resizable=0")
imp1.focus()
}
function agb(){
var i;
imp1=window.open("agb.htm","agb","top=100,left=50,width=500,height=400,scrollbars=1,resizable=0")
imp1.focus()
}
