﻿if(location.href.indexOf("/en")!=-1||location.href.indexOf("/proizvodi/")!=-1) folder='../'; else folder='';
/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
/*form*/
if (!jQuery.expr[':']['input'])
    jQuery.extend(jQuery.expr[':'], {input: "a.nodeName.toLowerCase().match(/input|select|textarea|button/)" });
jQuery.fn.ajaxSubmit = function(options) {
    options = jQuery.extend({
        target:   null,
        url:      this.attr('action') || '',
        method:   this.attr('method') || 'GET',
        before:   null,
        after:    null,
        dataType: null, // 'xml', 'script', or 'json' (@see jQuery.httpData)
        semantic: false
    }, options || {});
    
    var a = this.formToArray(options.semantic);
    
    // give pre-submit callback an opportunity to abort the submit
    if (options.before && options.before(a, this) === false) return;

    var q = jQuery.param(a);
    var get = (options.method && options.method.toUpperCase() == 'GET');

    if (get)
        // if url already has a '?' then append args after '&'
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) 
        jQuery(options.target).load(options.url, get ? null : a, options.after);
    else
        jQuery.ajax({ 
            url:      options.url, 
            success:  options.after, 
            type:     options.method, 
            dataType: options.dataType,
            data:     get ? null : q // data is null for 'get' or the query string for 'post'
        });
    return this;
};
jQuery.fn.ajaxForm = function(options) {
    return this.each(function() {
        jQuery("input[@type=submit],input[@type=image]", this).click(function(ev) {
            this.form.clk = this;
            
            if (ev.offsetX != undefined) {
                this.form.clk_x = ev.offsetX;
                this.form.clk_y = ev.offsetY;
            } else if (typeof jQuery.fn.offset == 'function') { // try to use dimensions plugin
                var offset = $(this).offset();
                this.form.clk_x = ev.pageX - offset.left;
                this.form.clk_y = ev.pageY - offset.top;
            } else {
                this.form.clk_x = ev.pageX - this.offsetLeft;
                this.form.clk_y = ev.pageY - this.offsetTop;
            }
        })
    }).submit(function(e) {
        jQuery(this).ajaxSubmit(options);
        return false;
    });
};
jQuery.fn.formToArray = function(semantic) {
    var a = [];
    var q = semantic ? ':input' : 'input,textarea,select,button';
    
    jQuery(q, this).each(function() {
        var n = this.name;
        var t = this.type;

        if ( !n || this.disabled || t == 'reset' ||
            (t == 'checkbox' || t == 'radio') && !this.checked ||
            (t == 'submit' || t == 'image' || t == 'button') && this.form && this.form.clk != this ||
            this.tagName.toLowerCase() == 'select' && this.selectedIndex == -1)
            return;

        if (t == 'image' && this.form.clk_x != undefined)
            return a.push(
                {name: n+'_x', value: this.form.clk_x},
                {name: n+'_y', value: this.form.clk_y}
            );

        if (t == 'select-multiple') {
            jQuery('option:selected', this).each( function() {
                a.push({name: n, value: this.value});
            });
            return;
        }
        a.push({name: n, value: this.value});
    });
    return a;
};
jQuery.fn.serialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return jQuery.param(this.formToArray(semantic));
};
/***********************************************
* Pausing up-down scroller-  Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var pausecontent=new Array()
pausecontent[0]='Vršimo usluge pranja, čišćenja i servisiranja klima sustava te dezinfekciju ventilacijskih kanala.'
pausecontent[1]='Čišćenje klima po uredima sa suhom parom. Djeluje dezinfekcijski (temperatura pare je do 130 C°).'
pausecontent[2]='Strojno uklanjanje svih nečistoća rotacijskim uređajem iz klima kanala promjera od 200 do 700 mm.'
pausecontent[3]='Prodaja Orbitalum Tools +GF+ strojeva i alata za obradu krajeva cijevi.'
pausecontent[4]='Podni filteri za termolakirnice za boje na vodenoj bazi.'
function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}
// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------
pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
this.tickerdiv.onmouseover=function(){scrollerinstance.mouseoverBol=1}
this.tickerdiv.onmouseout=function(){scrollerinstance.mouseoverBol=0}
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}
// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------
pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}
// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------
pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}
// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------
pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}
pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
var orig="";
function getOriginal() {
	orig = document.getElementById('desc').innerHTML;
	if (orig == undefined) orig = "";
}
function writein(thetext){
document.getElementById('desc').innerHTML=thetext}
function writeout(){
document.getElementById('desc').innerHTML=orig}
/**************************************************************************
 * Johnvey.com global functions
 * - jvScrambler object
 *
 * All content licensed under a Creative Commons License.
 * See http://johnvey.com for details
 *
 * 2005 Johnvey Hwang
 *************************************************************************/
function jvScrambler(objectID, phraseID, basePhrase) {
	this.cs = new Array("a","b","c","d","e","f","g","h","i","k","l","m","n","o","p","r","s","t","u","v","z","d","i","t","d","o","t");
	this.oid = objectID;
	this.base = basePhrase;
	this.timer = null;
	this.eid = phraseID;
}
jvScrambler.prototype.go = function(ph) {
	this.loops = 0;
	this.cnt = 0;
	this.phrase = ph;
	this.words = this.phrase.split(" ");
	for(var i=this.words.length-1; i; i--) this.loops = Math.max(this.loops, this.words[i].length);
	clearTimeout(this.timer);
	this.timer = setTimeout(this.oid + ".m_scrPhrase()",25);
}
jvScrambler.prototype.reset = function() {
	this.go(this.base);
}
jvScrambler.prototype.m_scrPhrase = function() {
	var out = "";
	if(this.cnt++ >= this.loops) {
		clearTimeout(this.timer);
		out = this.phrase;
	} else {
		for(var i=0; i < this.words.length; i++) out += this.m_scrWord(this.words[i], this.cnt) + " ";
		this.timer = setTimeout(this.oid + ".m_scrPhrase()",25);
	}
	document.getElementById(this.eid).innerHTML = out;
}
jvScrambler.prototype.m_scrWord = function(wd, po) {
	var ln = wd.length;
	if(po >= ln) return wd;
	var out = wd.substring(0, po);// + "<span class=\"scH\">|</span><span class=\"scL\">";
	var i = ln - po;
	do { out += this.cs[Math.floor(Math.random() * 20)]; } while(--i);
	out += "</span>";
	return out;
}
var scrambler = new jvScrambler("scrambler", "desc", "");
var od, cd, bd, sd, steps=10, inter=2, power=2, sc;
var steps2=20, inter2=1, power2=1;
function opendiv(which, end) {
	x=document.getElementById(which)
	if (x.style.height != '0px' && x.style.height != "") {
		z=x.style.height;
		z=z.substring(0,z.length-2); z*=1;
		animate(x,z,0,steps,inter,power, 'height', od);
	}
	else animate(x,0,end,steps,inter,power, 'height', od);
}
function toggleForm() {
	x=parent.document.getElementById('fright')
	y=x.style.marginLeft;
	if (y != '') {
		y=y.substring(0,y.length-2); y*=1;
		z=x.style.width;
		z=z.substring(0,z.length-2); z*=1;
		if (y==0) { endy = 321; endz=100; endw=49; endww=53;}
		else { endy=0; endz=423; endw=0; endww=0; startw=49; startww=53;}
	} else {
		y=321; z=100; endy=0; endz=423; endw=0;endww=0;startw=49; startww=53;
	}

	w=document.getElementById("frameleft");
	w.style.width = endww+'px';
	w.style.paddingLeft = endw+'px';
	
	//animate(w, startw, endw, steps2, inter2, power2, 'paddingLeft', bd);
	//animate(w, startww, endww, steps2, inter2, power2, 'width', bd);
	animate(x, y, endy, steps, inter, power, 'marginLeft', cd);
	animate(x, z, endz, steps, inter, power, 'width', od);
}

function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) {
//generic animation step value generator by www.hesido.com
	var delta = maxValue - minValue;
	var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
	return Math.ceil(stepp)
}
function animate(elem,start,end,steps,intervals,powr,what,timer) { 
//by www.hesido.com
	var heightInt, widthInt, marginInt
	if (what == 'height') memInt = heightInt;
	if (what == 'width') memInt = widthInt;
	if (what == 'marginLeft') memInt = marginInt;

	//elem = document.getElementById(elem);
    if (timer)
	window.clearInterval(timer);
    var actStep = 0;
    timer = window.setInterval(
	function() { 
	  elem.current = easeInOut(start,end,steps,actStep,powr);
	  elem.style[what] = elem.current + "px"; 
	  actStep++;
	  if (actStep > steps) {window.clearInterval(timer); }
	} 
	,intervals)
}
function swfonload(){
	var x = new SWFObject(folder+"swf/news.swf", "ikski", "80", "80", "7", "#ffffff");	
	x.addParam("wmode", "transparent");
	x.write("newsOnload");
}

function doit() {
/*$('div.hnews').each(function(){this.orig = this.style.backgroundImage});
$('div.hnews').mouseover(function(){this.style.backgroundImage='url('+folder+'gfx/ntile2.jpg)'});
$('div.hnews').mouseout(function(){this.style.backgroundImage=this.orig})*/
var divTags = new Array();
var divTags=document.getElementsByTagName("div");
for (i=0; i<divTags.length; i++) {
if (divTags[i].className == 'hnews') {
divTags[i].orig = divTags[i].style.backgroundImage;
divTags[i].onmouseover =  function() {this.style.backgroundImage='url('+folder+'gfx/ntile2.jpg)'}
divTags[i].onmouseout = function() {this.style.backgroundImage=this.orig}}
}
var listTags= new Array(); 
var listTags=document.getElementsByTagName("li");
for (i=0; i<listTags.length; i++) {
if (listTags[i].className != 'pro' && listTags[i].className != 'proLast') {
listTags[i].onmouseover =  function() {this.style.backgroundColor='#F7F7F7'; this.style.backgroundPosition='0px -99px'}
listTags[i].onmouseout = function() {this.style.backgroundColor=''; this.style.backgroundPosition='0px 130px'}}
}
var inputTags = new Array();
var inputTags=document.getElementsByTagName("input");
for (i=0; i<inputTags.length; i++) {
inputTags[i].onfocus = function() { this.style.backgroundColor='#F7FAF6'}
inputTags[i].onblur = function() {this.style.backgroundColor=''}
}
var areaTags = new Array();
var areaTags=document.getElementsByTagName("textarea");
for (i=0; i<areaTags.length; i++) {
areaTags[i].onfocus = function() { this.style.backgroundColor='#F7FAF6'}
areaTags[i].onblur= function() {this.style.backgroundColor=''}
}
var selectTags = new Array();
var selectTags=document.getElementsByTagName("select");
for (i=0; i<selectTags.length; i++) {
selectTags[i].onfocus = function() { this.style.backgroundColor='#F7FAF6'}
selectTags[i].onblur= function() {this.style.backgroundColor=''}
}
}
function writeForm(val){
if (val=="2") {
	okviri = new Array('Metalni okvir', 'Pocinani (INOX) okvir');
	klase = new Array('G2','G3','G4','G5','F1','F2','F3','F4','F5');
	dimenzije = new Array('592 x 592 x 48 mm','592 x 592 x 98 mm','592 x 592 x 98 mm','287 x 592 x 98 mm','287 x 287 x 48 mm','287 x 287 x 98 mm');
	val="<p>Vrsta okvira:</p><select name='okvir'><option selected='selected' value=''>--/--</option>";
	for (i=0; i<okviri.length; i++) {val+="<option>"+okviri[i]+"</option>";}
	val+="</select><p>Klasa:</p><select name='klasa'><option selected='selected' value=''>--/--</option>";
	for (i=0; i<klase.length; i++) {val+="<option>"+klase[i]+"</option>";}
	val+="</select><p>Dimenzije:</p><select name='dimenzije'><option selected='selected' value=''>--/--</option>"
	for (i=0; i<dimenzije.length; i++) {val+="<option>"+dimenzije[i]+"</option>";}
	val+"</select>";
} else val = "";
x=document.getElementById('dynamic');
x.innerHTML = val;
doit();
}

function statOver() {
	x=document.getElementById('statistika'); 
	x.className = 'orderpullich';
}
function statOut() {
	x=document.getElementById('statistika');
	x.className = 'orderpull';
}	

var rollc = true;

$(function(){
	doit()
	selectit()
	$('#rollover,#rollover2').hide();
	$(".rContent").click(rolltoggle)
	$("#statistika").click(rolltoggle)
	$(".rContent").mouseover(function(){$('#statistika').removeClass('orderpull').addClass('orderpullich')})
	$(".rContent").mouseout(function(){$('#statistika').removeClass('orderpullich').addClass('orderpull')})
	$("#order a").toggle(
		function(){$('#rollover2').slideDown(500);return false;}, 
		function() {$('#rollover2').slideUp(500);return false;}
	);
})

function rolltoggle(){
	var div = $('#rollover').not('#rollover2');
	if (rollc) div.slideDown(500);
	else div.slideUp();
	rollc = !rollc;
	return false;
}

function selectit(){
	var index = 0;
	req=document.location.href;
	if (req.indexOf('materijal')!=-1)index=0;
	if (req.indexOf('panel')!=-1)index=1;
	if (req.indexOf('coil')!=-1)index=2;
	if (req.indexOf('vrece')!=-1)index=3;
	if (req.indexOf('termo')!=-1)index=4;
	if (req.indexOf('hepa')!=-1)index=5;
	if (req.indexOf('vcell')!=-1)index=5;
	if (req.indexOf('ugljen')!=-1)index=6;
	if (req.indexOf('indus')!=-1)index=7;
	$("#proizvodi select").children().each(function(i){
	if (i==index) this.selected = true;
	});
	var options = {
    target: '#dynamic',
		datatype: 'script',
		before: removeerrors
  };   
	$('#proizvodi,#kontakt').ajaxForm(options);
}
function removeerrors() {
	$('#dynamic').html('<p><img src="'+folder+'gfx/ajax-loader.gif"></p>');
	$('input,textarea').removeClass('error')
}
function header(active) {
	var hed = new SWFObject(folder+"swf/header.swf", "hederski", "780", "170", "7", "#ffffff");
	hed.addParam("wmode", "transparent");
	hed.addVariable("active", active);
	hed.write("header");
}
function map() {
	var mapski = new SWFObject(folder+"swf/karta_1.swf", "mapski", "285", "230", "7", "#ffffff");
	mapski.addParam("wmode", "transparent");
	mapski.write("map");
}
function termo() {
	var termski = new SWFObject(folder+"swf/filteri.swf", "termski", "425", "280", "7", "#ffffff");
	termski.addParam("wmode", "transparent");
	document.write(termski.getSWFHTML())
}
function prociscivaci() {
	var procki = new SWFObject(folder+"swf/amaircare.swf", "procki", "150", "158", "7", "#ffffff");
	procki.addParam("wmode", "transparent");
	document.write(procki.getSWFHTML())
}
function gf() {
	var george= new SWFObject(folder+"swf/georg.swf", "george", "150", "158", "7", "#ffffff");
	george.addParam("wmode", "transparent");
	document.write(george.getSWFHTML())
}
function ciscenje() {
	var ciscenje= new SWFObject(folder+"swf/ciscenje-lima.swf", "ciscski", "160", "158", "7", "#ffffff");
	ciscenje.addParam("wmode", "transparent");
	document.write(ciscenje.getSWFHTML())
}
