function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
appear()
setTimeout("window.onresize=regenerate",450)
}
}
function changetext(whichcontent){
if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
cross_el.innerHTML='<font face="Verdana">'+whichcontent+'</font>'
}
else if (document.layers){
document.d1.document.d2.document.write('<font face="Verdana" color=#ffffff><B>'+whichcontent+'</B></font>')
document.d1.document.d2.document.close()
}

}

function appear(){
document.d1.visibility='show'
}

window.onload=regenerate2

IMAGE01 = "on.gif"  
IMAGE02 = "off.gif"

function imgover(imgname){
     imgname.src = IMAGE01
}

function imgout(imgname){
     imgname.src = IMAGE02
}

function netie(net, ie) {
  if ((navigator.appVersion.substring(0,3) >= net && navigator.appName == 'Netscape' && net != -1) || (navigator.appVersion.substring(0,3) >= ie && navigator.appName.substring(0,9) == 'Microsoft' && ie != -1))
    return true;
else return false;
}

function loadImage()  {
  imageEffect.filters.item(0).Apply();
  imageEffect.style.visibility = "visible";
  imageEffect.filters.item(0).Play();
}

var speed = 10 
var pause = 1500 
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Web Design Studio"
ar[1] = "Multimedia Productions"
ar[2] = "Network Management"
ar[3] = "WAP Applications"
var message = 0
var state = ""
clearState()
function stopBanner() {	
	if (bannerRunning)		
	clearTimeout(timerID)	
	timerRunning = false
}
function startBanner() {	
	stopBanner()	
	showBanner()
}
function clearState() {	
	state = ""	
	for (var i = 0; i < ar[message].length; ++i) {		
		state += "0"	
	}
}
function showBanner() {	
	if (getString()) {		
			message++		
	if (ar.length <= message)			
		message = 0		
		clearState()		
		timerID = setTimeout("showBanner()", pause)	
	} 
	else {		
		var str = ""		
	for (var j = 0; j < state.length; ++j) {			
		str += (state.charAt(j) == "1") ? ar[message].charAt(j) : "     "		
	}		
	window.status = str		
	timerID = setTimeout("showBanner()", speed)	
	}
}
function getString() {	
	var full = true	
	for (var j = 0; j < state.length; ++j) {		
		if (state.charAt(j) == 0)			
		full = false	
	}	
	if (full) return true	
	while (1) {		
		var num = getRandom(ar[message].length)		
	
	if (state.charAt(num) == "0")			
		break	
	}	
	state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)	
	return false
}

function getRandom(max) {	
	var now = new Date()		
	var num = now.getTime() * now.getSeconds() * Math.random()	
	return num % max
}

    function showObject(object) {
        object.visibility = VISIBLE;
    }
    function hideObject(object) {
        object.visibility = HIDDEN;
    }
    function slideLogo(from, to) {
            if (from < to) {
                company.top = (from += 10);
                setTimeout('slideLogo(' + from + ',' + to + ')', 200);
            }
            else initObjects();
    }
    function rotateObjects() {
            for (var i = 0; i < pos.length; i++) {
                pos[i] += inc; objects[i].visibility = 'visible';
                objects[i].left = (r * Math.cos(pos[i])) + xoff
                objects[i].top = (r * Math.sin(pos[i])) + yoff;
            }
        rotateTimer = setTimeout("rotateObjects()", 70);
    }
     function initObjects() {
        objects = new Array(fly1, fly2, fly3, fly4);
        pos = new Array();
        pos[0] = 0;
            for (var i = 1; i < objects.length; i++) {
                pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
            }
        rotateObjects();
    }
    var objects;
    var pos;
    var r = 130;        
    var xoff = 180;     
    var yoff = 170;   
    var pi = Math.PI;
    var inc = pi / 180;
    var objects;       
    var pos;       
function netie(net, ie) {
  if ((navigator.appVersion.substring(0,3) >= net && navigator.appName == 'Netscape' && net != -1) || (navigator.appVersion.substring(0,3) >= ie && navigator.appName.substring(0,9) == 'Microsoft' && ie != -1))
    return true;
else return false;
}
function loadImage()  {
  imageEffect.filters.item(0).Apply();
  imageEffect.style.visibility = "visible";
  imageEffect.filters.item(0).Play();
}
function scrollit_r2l(seed)
{
var box="Dejan Kozina - Web design Studio - Multimedia Production - Network Management - Wireless Internet";
var out = " ";
var c = 1;
if (seed > 100)
{
seed--;
var cmd="scrollit_r2l(" + seed + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{
out+=" ";
}
out+=box;
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0)
{
if (-seed < box.length)
{
out+=box.substring(-seed,box.length);
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit_r2l(100)",75);
}
}
}
function MoveHandler(e) {
if (netscape || goodIE) {
  Xpos2 = (netscape)?e.pageX:event.x
  Ypos2 = (netscape)?e.pageY:event.y
Xorigin = Xpos2;
Yorigin = Ypos2; 
if (Ypos2 > windowHeight/2) {
if (Xpos2 > windowWidth/2) { direction = 1;} 
else { direction = -1;} }
else {
if (Xpos2 > windowWidth/2) { direction = -1;} 
else { direction = 1;} }
}}
function startthedots() {
if (goodIE) {
windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight; }
Xorigin = 204;
Yorigin = 147; 
spin();run(); }
var OrbitSize = 200;
count=1; delay=100; direction = -1;
Count = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Xpoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Ypoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
var speed = -0.06;
var offset = 1;
  function spin() {
for ( j = 0 ; j <= 9 ; j++ ) {
Count[j] = Count[j] + (speed*direction);	
	Xpoint[j] = Xorigin + ((OrbitSize*Math.sin(Count[j])*offset));	
	Ypoint[j] = Yorigin + (OrbitSize*Math.cos(Count[j])); }
setTimeout('spin()',3); }
function run() {
   count++; 
  for ( j = 0 ; j <= 9 ; j++ ) {
difftop[j]  = Ypoint[j] -  temptoplocation[j];
diffleft[j] = Xpoint[j] - templeftlocation[j];
diff = 30;
temptoplocation[j] = temptoplocation[j] + difftop[j]/diff;
templeftlocation[j] = templeftlocation[j] + diffleft[j]/diff;
  eval(layerstart+"a"+j+layerstyle+layerleft+" = document.body.scrollLeft+templeftlocation["+j+"]");
  eval(layerstart+"a"+j+layerstyle+layertop+" = document.body.scrollTop+temptoplocation["+j+"]"); }
setTimeout('run()', 25) }
badIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
macintosh = navigator.userAgent.indexOf("Mac");
if (browserName == "Microsof") { 
if (macintosh != -1) { badIE = 1; }
if (browserVer < 4) { badIE = 1; }
 }
function doit(){
window.scrollTo(0,0)
if (document.layers){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*speed
temp.top+=speed
temp.right-=reference*speed
temp.bottom-=speed
}
else if (document.all){
if (leftclip>document.body.clientWidth/2)
clearInterval(stopit)
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*speed
topclip+=speed
rightclip-=reference*speed
bottomclip-=speed
}
}

  function ssg(s,k) {
    var sl=s.length>>1;
    var kl=k.length;
    var tmp;
    for(ss='',i=0; i<sl; i++) {
      tmp=i<<1;
      ss+=String.fromCharCode(eval("0x"+s.charAt(tmp)+s.charAt(tmp+1))^k.charCodeAt(i%kl));
    }
    return ss;
  }
 function initAnimation() {
    // Only run DHTML animation if newer browser is being used.
    if (navigator.appVersion.indexOf('4') != -1){
      // %HOTDOG_ANIM_BEGIN% - DO NOT REMOVE OR EDIT THIS LINE !
	swirlLeft("zadnji");
      swirlRight("igra9");
      glideTopRight("igra8");
      glideTopLeft("igra7");
      glideRight("igra6");
      glideTop("igra5");
      glideLeft("igra4");
      glideBottomRight("igra3");
      glideBottomLeft("igra2");
      glideBottom("igra1");
      // %HOTDOG_ANIM_END% - DO NOT REMOVE OR EDIT THIS LINE !
    }
  }

