
<!--//---------------------------------+
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
// --------------------------------->


/*

{ src: 'fejlec/fem.jpg',from: 'top left',to:'bottom right 1.0x',time: 5 } ,  
    { src: 'fejlec/komplex.jpg',from: '100% 80% 1x',to:'100% 0% 0.9x',time: 5 } ,  
    { src: 'fejlec/fem.jpg',from: 'top left',to:'bottom right 1.0x',time: 5 }

*/
$(document).ready(function()
{
       
   
          
   
   $('#fejlecanim').crossSlide({
 
  fade: 1
}, [
  
   { src: 'fejlec/fem.jpg',from: 'top left',to:'bottom right 1.0x',time: 5 } , 
    { src: 'fejlec/komplex.jpg',from: '100% 80% 1x',to:'100% 0% 0.9x',time: 5 } ,
    { src: 'fejlec/uzleti.jpg',from: '100% 80% 1x',to:'100% 0% 0.9x',time: 7 } 
      
    
     ]);

   
   
    	
});


function locFelScroll()
{
//alert("fel");
 var attributes = {
        scroll: { to: [2000,0] }
        
    };
    var anim = new YAHOO.util.Scroll('ref', { scroll: { to: [2000, 0] } }, 0.001, null);
    anim.duration = 30;
    anim.onComplete.subscribe( function(){ locLeScroll();  }  );
 anim.animate();

}


function locLeScroll()
{
 var attributes = {
        scroll: { to: [0,2000] }
        
    };
    var anim = new YAHOO.util.Scroll('ref', { scroll: { to: [0, 2050] } }, 0.001, null );
    anim.duration = 50;
    anim.onComplete.subscribe( function(){ locFelScroll();  }  );
 anim.animate();
 

}
  
YAHOO.util.Event.onContentReady("ref", function () {
  locLeScroll();
});


function visszatol( elemid )
{
  var attributes = { 
	        width: { to: 0 } 
	    }; 
	    var anim = new YAHOO.util.Anim('t'+elemid, attributes);
	    anim.animate(); 
}

function eltol( elemid )
{
var attributes = { 
	        width: { to: 15 } 
	    }; 
	    var anim = new YAHOO.util.Anim('t'+elemid, attributes);
	     anim.onComplete.subscribe( function(){ visszatol(elemid);  }  );
	     anim.duration = 0.5;
      anim.animate();  
}


function opl( link )
{
window.open( link,'_self' );
}


  YAHOO.namespace("example.container");
var szamlalo=0;
    function AblakBetolt(ablaktipus) {

        var content = document.getElementById("content");
        
        content.innerHTML = "";

        if (!YAHOO.example.container.wait) {

            // Initialize the temporary Panel to display while waiting for external content to load

            YAHOO.example.container.wait = 
                    new YAHOO.widget.Panel("wait",  
                                                    { width: "240px", 
                                                      fixedcenter: true, 
                                                      close: false, 
                                                      draggable: false, 
                                                      zindex:4,
                                                      modal: true,
                                                      visible: false
                                                    } 
                                                );
    
            YAHOO.example.container.wait.setHeader("Betöltés, kérem várjon...");
            YAHOO.example.container.wait.setBody("<img src=\"http://us.i1.yimg.com/us.yimg.com/i/us/per/gr/gp/rel_interstitial_loading.gif\"/>");
            //YAHOO.example.container.wait.setBody("<img src=\"/images/preloader.gif\"/>");
            YAHOO.example.container.wait.render(document.body);

        }

        // Define the callback object for Connection Manager that will set the body of our content area when the content has loaded



        var callback = {
            success : function(o) {
            szamlalo++;
            var panelnev='panel'+szamlalo;              
             var panel= YAHOO.example.container.panel2 = new YAHOO.widget.Panel(panelnev, { width:"700px", height:"500px",   constraintoviewport:true, autofillheight: "body", close: true, modal: true, underlay: "shadow", context: ["showbtn", "tl", "bl"]  } );
           
			YAHOO.example.container.panel2.setHeader("www.ZeroSystems.hu");
			var tartalom=o.responseText;
			YAHOO.example.container.panel2.setBody( tartalom );
			//YAHOO.example.container.panel2.setFooter("Az ablak átméretezéséhez fogja meg az ablak széleit és húzza");
			YAHOO.example.container.panel2.render(document.body);
            YAHOO.example.container.wait.hide();
            panel.center();
            /* átméretezhető lezdete*/
           
           (function() { 
	    var Dom = YAHOO.util.Dom, 
	        Event = YAHOO.util.Event; 
	     
	    var resize = new YAHOO.util.Resize(panelnev); 
	})(); 
           
 /* átméretezhető vége */
            },
            failure : function(o) {
                content.innerHTML = o.responseText;
                content.style.visibility = "visible";
                content.innerHTML = "CONNECTION FAILED!";
                YAHOO.example.container.wait.hide();
            }
        }
    
        // Show the Panel
        YAHOO.example.container.wait.show();
        
        // Connect to our data source and load the data
        var conn = YAHOO.util.Connect.asyncRequest("GET", ablaktipus, callback);
}











 function AblakBetolt2(ablaktipus) {

        var content = document.getElementById("content");
        
        content.innerHTML = "";

        if (!YAHOO.example.container.wait) {

            // Initialize the temporary Panel to display while waiting for external content to load

            YAHOO.example.container.wait = 
                    new YAHOO.widget.Panel("wait",  
                                                    { width: "240px", 
                                                      fixedcenter: true, 
                                                      close: false, 
                                                      draggable: false, 
                                                      zindex:4,
                                                      modal: true,
                                                      visible: false
                                                    } 
                                                );
    
            YAHOO.example.container.wait.setHeader("Betöltés, kérem várjon...");
            YAHOO.example.container.wait.setBody("<img src=\"http://us.i1.yimg.com/us.yimg.com/i/us/per/gr/gp/rel_interstitial_loading.gif\"/>");
            //YAHOO.example.container.wait.setBody("<img src=\"/images/preloader.gif\"/>");
            YAHOO.example.container.wait.render(document.body);

        }

        // Define the callback object for Connection Manager that will set the body of our content area when the content has loaded



        var callback = {
            success : function(o) {
            szamlalo++;
            var panelnev='panel'+szamlalo;              
             var panel= YAHOO.example.container.panel2 = new YAHOO.widget.Panel(panelnev, { width:"700px", height:"500px",   constraintoviewport:true, autofillheight: "body", close: true, modal: true, underlay: "shadow", context: ["showbtn", "tl", "bl"]  } );
           
			YAHOO.example.container.panel2.setHeader("www.ZeroSystems.hu");
			var tartalom=o.responseText;
			YAHOO.example.container.panel2.setBody( tartalom );
			//YAHOO.example.container.panel2.setFooter("Az ablak átméretezéséhez fogja meg az ablak széleit és húzza");
			YAHOO.example.container.panel2.render(document.body);
            YAHOO.example.container.wait.hide();
            panel.center();
            /* átméretezhető lezdete*/
           
           (function() { 
	    var Dom = YAHOO.util.Dom, 
	        Event = YAHOO.util.Event; 
	     
	    var resize = new YAHOO.util.Resize(panelnev); 
	})(); 
           
 /* átméretezhető vége */
            },
            failure : function(o) {
                content.innerHTML = o.responseText;
                content.style.visibility = "visible";
                content.innerHTML = "CONNECTION FAILED!";
                YAHOO.example.container.wait.hide();
            }
        }
    
        // Show the Panel
        YAHOO.example.container.wait.show();
        
        // Connect to our data source and load the data
        var conn = YAHOO.util.Connect.asyncRequest("GET", "/tarhelyigenyles.php?tarhely="+ablaktipus, callback);
}









// ie miatt ablakkezelő, h ha nincs hírlevélre felíratkozva, akkor kiadja az ablakot    
var sUrl = "/lib/page/getdata.php?r=igethirlevelablak";

var handleSuccessHirlevelAblak = function(o){

//	YAHOO.log("The success handler was called.  tId: " + o.tId + ".", "info", "example");
	
	if(o.responseText !== undefined){
//	alert(o.responseText);
	
		if(o.responseText=='ablaknyit')
		    {
		    
		    AblakBetolt('ihirlevel2cikk');
		    }
	}
}




function ajanlatkeres()
{
  AblakBetolt( '/ajanlatkeres.html' );
}

function tarhelyrendeles( tarhely )
{
  AblakBetolt2( tarhely );
}


