function HelpWin(url,w,h) {
	bang = window.open(url ,"helpWin","toolbar=no,scrollbars,resizable,top=20,left=420,width=" + w + ",height=" + h);
	bang.focus();
}

function openNewWin(url,content,w,h) {
	var bang;
	if (w==null||w.length==0)
		w=880;
	if (h==null||h.length==0)
		h=400;
	if (url==null||url.length==0)
		url="";
	bang = window.open(url ,"helpWin","toolbar=no,scrollbars,resizable,top=20,left=420,width=" + w + ",height=" + h);
	bang.document.open();
	if (content!=null&&content.length > 0 ) {
		bang.document.write("<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"siffi.css\"></head><body bgcolor=\"#123241\" style=\"color:white\">");
		bang.document.write(content);
		bang.document.write("<br><br><form><input type=\"button\" class=\"button\" value=close onclick=\"self.close();window.opener.focus();\"> \n</form>\n</body>\n</html>\n");
	}
	bang.document.close();
	bang.focus();
	return;
}

function Cbegin() {
	document.Cart.src="Cartman_begin.gif";
}
function Cleft() {
	document.Cart.src="Cartman_left.gif";
}
function Cright() {
	document.Cart.src="Cartman_right.gif";
}
function preloadCartman() {
	var d = document;
	if(d.images){
		if(!d.MM_p){
			d.MM_p=new Array(); 
		}
		var i,j = d.MM_p.length, a = preloadCartman.arguments;
		for(i=0; i<a.length; i++) {
			if (a[i].indexOf("#")!=0) {
				d.MM_p[j]=new Image; d.MM_p[j++].src= a[i];
			}
		}
	}
}

function fnHighlightRow(oRow) {
	if (isMinIE4) {
		if (oRow.currentStyle.backgroundColor != "lightskyblue"){
			oRow.style.backgroundColor="lightskyblue";
			oRow.style.color="white";
		}else{
			oRow.style.backgroundColor="";
			oRow.style.color="";
		}
	}
}

function highlight(img) {
	if (img == "garfield") {
		document.siffi.src = "dil.gif";
	} else {
		document.siffi.src = "siffi_n.jpg";}
	return true;
}


function NoRightClick(evnt) {
	if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null) {
		if (evnt.which == 3){ alert("Nope! Siffi does not allow right mouse clicks! :-)"); return false; }
	} else {
		if (event.button==2) { alert("Nope! Siffi does not allow right mouse clicks! :-)"); return false; }
	}
}

// quotes
var quotex=0;
var maxquotex=10;
var quote=new Array();
quote[0]="siffert.ch reconceptualizes web application development in terms of objects, methods and properties instead of URLs and query parameters.<br><i>Trainer Liechti</i>";
quote[1]="<span class='highlightbox'>Monitor global trade flows with <a href='http://www.globaltradetracker.com' style='color:cornflowerblue;border: 0px;'>Global Trade Tracker</a></span>";
quote[2]="<b><em>siffert.ch</em>: the opinion of our visitors</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
quote[3]="siffert.ch's flexibility along with its clean object-oriented architecture make the interface shine.<br><i>Stefan Ruetsch</i>";
quote[4]="What I really like on siffert.ch are the nice colors!<br><i>Stefan Spicher</i>";
quote[5]="siffert.ch is the best solution to the presentation tier ...<br><i>Curdi&ntilde;ho Salis Gross</i>";
quote[6]="siffert.ch, a syncronized third-generation paradigm.<br><i>Thomi Jeitziner</i>";
quote[7]="siffert.ch redefines the network with high-availability end-to-end architecture.<br><i>Th. Ruefenacht</i>";
quote[8]="siffert.ch revolutionizes networking with high-availability multi-tier model.<br><i>Vince Lavanchy</i>";
quote[9]="siffert.ch breaks the mold with aggressively scalable end-to-end infrastructure.<br><i>M. Bucher</i>";
quote[10]="<em>Zen Innovations AG</em><span style='background-color:white'><br>&nbsp;<img src=zenlogosmall.gif>&nbsp;</span>";

function rotate_quote(){
	if (++quotex > maxquotex)
		quotex = 0;
	var newQuote = quote[quotex];
	var element = document.getElementById("quotecontainer");
	element.innerHTML = newQuote;
	window.setTimeout("rotate_quote()", 1000 * .05 * newQuote.length);
}
// This can't be done in nn4
function start_quoting() {
	rotate_quote();
}
//document.onmousedown=NoRightClick;
if (top.location!=location){
	top.location.href = location.href;
}

function rel_msg() {
	b=confirm('Doppelklicken ist in Webbrowsern nicht wirklich noetig....');
	if (!b) { alert('Echt, glaubs mir, Doppelklicken ist ueberfluessig!'); }
}

function toggleDisplay(elementId){
	e = document.getElementById(elementId);
	if (e){
		if (e.style.display == 'none'){
			e.style.display = 'block';
		}else{
			e.style.display = 'none';
		}
	}
}

function tableElementIdShow(elementid) {
	e = document.getElementById(elementid);
	if (e){
		e.style.display = ''; /* workaround for firefox */
	}
}

function toggleTableDisplay(elementId){
	e = document.getElementById(elementId);
	if (e){
		if (e.style.display == 'none'){
			e.style.display = ''; /* workaround for firefox */ 
		}else{
			e.style.display = 'none';
		}
	}
}
  
function setInnerHtml(elementId, text){
	e = document.getElementById(elementId);
	if (e){
		e.innerHTML = text;
		elementIdShow(elementId);
	}
}


function runSiffiscroll() {
	var layer;
	var mikex, mikey;
	// Locate placeholder layer so we can use it to position the scrollers.
	layer = getLayer("placeholder");
	mikex = getPageLeft(layer);
	mikey = getPageTop(layer);
	
	var myScroller1 = new Scroller(0, 0, 490, 75, 0, 0);
	myScroller1.setColors("#006600", "#990000", "white");
	myScroller1.setFont("Verdana,Arial,Helvetica", 2);
	myScroller1.setSpeed(25);
	myScroller1.setPause(2700);

	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490><b>Zen Innovations AG</b></td></tr><tr><td width=11></td><td width=490><span style='background-color:white'><br>&nbsp;<img src=zenlogosmall.gif>&nbsp;</span></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>Monitor global trade flows with <a href='http://www.globaltradetracker.com'><b>Global Trade Tracker</b></a></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>Not surprisingly, the introduction of this website &amp; and this technology has revolutionised the way that some companies manage and access data.</td></tr><tr><td width=11></td><td width=490><b>Trainer Liechti zu diesem Portal</b></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>Akne ist ein gr&ouml;sseres Problem als Verletzungen.</td></tr><tr><td width=11></td><td width=490><b>Trainer Liechti zur Kreuzbandverletzung von St&uuml;rmer Siffert</b></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>In diesem Scheissverein kann man nicht mal richtig feiern.</td></tr><tr><td width=11></td><td width=490>Die Meinung von <b>Curdi&ntilde;ho Salis Gross</b></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>We exist to competently supply principle-centered solutions.</td></tr><tr><td width=11></td><td width=490><b>Curdi&ntilde;ho Salis Gross zum neuen Bordeaux</b></td></tr></table>");
	myScroller1.addItem("<table border=0 cellpadding=0 cellspacing=0 width=490><tr><td width=11></td><td width=490>Our mission is to continue to interactively facilitate business materials so that we may globally disseminate high-payoff products while maintaining the highest standards.</td></tr><tr><td width=11></td><td width=490><b>St&uuml;rmer Siffert zur Lage der Welt</b></td></tr></table>");
	
	// Create the first scroller and position it.
	myScroller1.create();
	myScroller1.hide();
	myScroller1.moveTo(mikex, mikey);
	myScroller1.setzIndex(100);
	myScroller1.show();
}
function makeSpace() {
	if (isMinNS4) { document.write("<BR><BR>"); }
	if (isMinIE4) { document.write(""); }
}
document.ondblclick=rel_msg;
document.images.ondblclick=rel_msg;
