function popUp(URL, options){

	myWin = open(URL,"win", options);

	myWin.focus();

}

function getElement(objid) {

   if(document.all) {

      return document.all[objid];

   } else {

      return document.getElementById(objid);

   }

}

function siirry(urli){

	if(urli != ''){

		if(urli == 'back') history.go(-1);

		else window.location.href = urli;

	}

}

function select(what){

	if(what == 'Onni' && getElement('img_Onni')) getElement('img_Onni').src='imgs/mallisarja_onni_1.jpg';

	if(what == 'Juhla' && getElement('img_Juhla')) getElement('img_Juhla').src='imgs/mallisarja_juhla_1.jpg';

	if(what == 'Ilma' && getElement('img_Ilma')) getElement('img_Ilma').src='imgs/mallisarja_ilma_1.jpg';

}

function unselect(what){

	if(what == 'Onni' && getElement('img_Onni')) getElement('img_Onni').src='imgs/mallisarja_onni.jpg';

	if(what == 'Juhla' && getElement('img_Juhla')) getElement('img_Juhla').src='imgs/mallisarja_juhla.jpg';

	if(what == 'Ilma' && getElement('img_Ilma')) getElement('img_Ilma').src='imgs/mallisarja_ilma.jpg';

}

function swap_model(img_src){

	if(getElement('model')) getElement('model').style.backgroundImage = "url('imgs/"+img_src+"')";

}


	function moveArrow(y) {
		getelement('nuolioikea').style.top=y+'px';
        }
        
        
        if (document.images) {
        img1_on =new Image(); img1_on.src ="/template/nav_right_levella_on.jpg";
        img1_off=new Image(); img1_off.src="/template/nav_right_levella_off.jpg";;

        img2_on =new Image(); img2_on.src ="/template/nav_right_kannel_on.jpg";
        img2_off=new Image(); img2_off.src="/template/nav_right_kannel_off.jpg";

        img3_on =new Image(); img3_on.src ="/template/nav_right_macpine_on.jpg";
        img3_off=new Image(); img3_off.src="/template/nav_right_macpine_off.jpg";


        nuoli_on =new Image(); nuoli_on.src ="http://www.levella.fi/template/paavalikkonuoli.png";
        nuoli_off =new Image(); nuoli_off.src ="http://www.levella.fi/template/paavalikkonuoli_off.gif";

        }
        
        function vaihdakuvaon(k) {
        if (document.images)
        eval('document.img'+k+'.src=img'+k+'_on.src');
        }

        function vaihdakuvaoff(k) {
        if (document.images)
        eval('document.img'+k+'.src=img'+k+'_off.src');
        }
        
        function nuolioff(k) {
        if (document.images)
        eval('document.linkki'+k+'.src=nuoli_off.src');
        }
        
        function nuolion(k) {
        if (document.images)
        eval('document.linkki'+k+'.src=nuoli_on.src');
        }


