<!-- Scriptanfang

function random_img() {
/*
##############--Zufallsgenerator für Banneranzeige-------------------------################
---Legende für Arrays----------------------
 1. Array = Pfadangabe wo der Banner liegt
 2. Array = Linkangabe
 3. Array = Target 
 4. Array = Bildname (Alt-Tag)
---------------- Diese Werte können angepasst werden für die Banneranzeige-----------------
------------- Beachte bitte das es am Schluss kein Komma braucht-------------------------- 
###########################################################################################  
*/  
 

images = new Array(
	new Array("http://www.tic.ch/en/banner/datacenter.swf","/ueberuns/datacenters.php","_self","Datacenter"),
	new Array("http://www.tic.ch/en/banner/mpls.swf","/produkte/mplsvpn.php","_self","MPLS"),
	new Array("http://www.tic.ch/en/banner/virtual-office.swf","/produkte/virtualoffice.php","_self","Virtual Office"),
	new Array("http://www.tic.ch/en/banner/mail_on_the_move.swf","/produkte/hostedexchange.php","_self","Mail on the Move"),
//	new Array("http://www.tic.ch/en/banner/antivirus.swf","/itservices/antispam.php","_self","Antivirus"),
	new Array("http://www.tic.ch/en/banner/china.swf","/produkte/china.php","_self","China") ,
	new Array("http://www.tic.ch/en/banner/dialup.swf","/produkte/dialup.php","_self","Dialup")
//	,
//	new Array("http://www.tic.ch/en/banner/phone.swf","/produkte/viaphone.php","_self","Phone")
 );


for (i=0;i<images.length+i;i++) {
 a = Math.round(Math.random()*images.length);
 if ((a >= 0) && (a < images.length)) {
  wert = images[a];
  
  banner = wert[0];
  urllink = wert[1];
  target = wert[2];  
  alttag = wert[3];

	tmpHTML  = "";	
	tmpHTML = tmpHTML+ "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='468' HEIGHT='60' id='"+banner+"' alt='"+alttag+"' ALIGN=''>";
	tmpHTML = tmpHTML+ "  <PARAM NAME=movie VALUE='"+banner+"'>";
	tmpHTML = tmpHTML+ "  <PARAM NAME=loop VALUE=true>";
	tmpHTML = tmpHTML+ "  <PARAM NAME=quality VALUE=best>";
	tmpHTML = tmpHTML+ "  <EMBED src='"+banner+"' loop=true quality=best WIDTH='468' HEIGHT='60' NAME='"+banner+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>";
	tmpHTML = tmpHTML+ "  </EMBED>";
	tmpHTML = tmpHTML+ "</OBJECT>";

	document.write( tmpHTML );
  break;
  }
 }
}


function openGallery( id )
{
	gallery = window.open( "/cn/gallery_popup.php?id="+id, "gallery", "width=1, height=1, toolbar=no,menubar=no,resizable=no,scrollbars=no"  );	
	gallery.focus();
}//openGallery

function loadImage( id )
{
	document.getElementById("galleryImage").src = "media/img/pic/gallery/pic" +id+ "b.jpg";

	timer = window.setTimeout( "resizeWindow()", 1000 );
}//loadImage
function resizeWindow()
{
	imgWidth = document.getElementById("galleryImage").width;
	imgHeight = document.getElementById("galleryImage").height;
	
	window.resizeTo ( imgWidth, imgHeight )
}

function getImageId()
{
	urlLoc = document.location.href;
	imgId = urlLoc.substring( urlLoc.indexOf( "id" )+3, urlLoc.length )
	return imgId
}

function checkForm( formData )
{
	//validation disabled
	return true;
/*
	error = 0

	email = formData.elements["mail"].value
	atPos = email.indexOf( "@" )
	
	if( atPos != -1 )
	{
		domain = email.substring( atPos+1, email.length )
		
		dotPos = domain.indexOf( "." )
		
		if( dotPos == -1 )
		{
			document.forms["kontakt"].elements["mail"].className = "error";
			error = "Bitte tragen Sie ein eine gültiges Emailadresse! (Domän fehlst..)"			
		}
		else if( domain.length - dotPos <= 2 )
		{
			document.forms["kontakt"].elements["mail"].className = "error";
			error = "Bitte tragen Sie ein eine gültiges Emailadresse! (gültiges Domän..)"					
		}
	}
	else
	{
		document.forms["kontakt"].elements["mail"].className = "error";
		error = "Bitte tragen Sie ein eine Emailadresse!"	
	}
		
	if(error == 0)
	{
		return  true;
	}
	else
	{
		alert( error )
		return false;
	}

*/

}

function updateLiveCam()
{
	randomNr = Math.random();
	document.getElementById("liveCam").src="http://livecam.vianetworks.ch/fullsize.jpg?rand="+randomNr;
	liveUpdate = setTimeout( "updateLiveCam()", 1000 * 5 );
}


function returnHandler()
{
	//return true;
}
function openPopup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// Script Ende -->