window.name="main_window";

function  AfterLoadControler() {
	var self = new Object();  var old = window.onload; self.functions = Array();
	self.add = function add(funAdd) { self.functions[self.functions.length] = funAdd; }
	self.run = function run() { for (funAdd in self.functions) { funAdd = self.functions[funAdd]; funAdd(); } }
	if (typeof old != 'function') { window.onload = function() { self.run(); } } else { window.onload = function() { self.run(); old(); }; }
	return self;
}
function afterLoadRun() { afterLoadControler.run(); }

var afterLoadControler = new AfterLoadControler();




function Skype(type,url) {
	// alert(type+" "+url);
    var zespresso_url = "";
	advAJAX.get({
    	url: zespresso_url+"/shop/skype."+type+".html",
    	onSuccess : function(obj) {
    		// alert(obj.responseText);
    		document.location.href=url;
		}
	});
}








/*


var oldWindowInit = window.init;
if (typeof(window.init)=='function') {

} else {
	window.init = afterLoadRun;
}




function tabberAutomaticOnLoad(tabberArgs)
{
  // This function adds tabberAutomatic to the window.onload event,
  // so it will run after the document has finished loading.

  var oldOnLoad;

  if (!tabberArgs) { tabberArgs = {}; }

  // Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent

  oldOnLoad = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = function() {
      tabberAutomatic(tabberArgs);
    };
  } else {
    window.onload = function() {
      oldOnLoad();
      tabberAutomatic(tabberArgs);
    };
  }
}

*/