try

{

 top.location.href;

}

catch (e)

{

 top.location.href = self.location.href;

}



function okno()

{
	//el, frame, width, height

	el='/selector.html';

	frame='popup';

	width='600';

	height='600';

 var wnd = window.open(typeof el == 'string' ? el : el.href, typeof frame == 'undefined' ? '' : frame, 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no' + (typeof width != 'undefined' ? ',width=' + width : '') + (typeof height != 'undefined' ? ',height=' + height : ''));

 //if (!wnd) return false;

 //wnd.focus();

 //return ;

}



function aTarget(el, name)

{

 var wnd = window.open(typeof el == 'string' ? el : el.href, typeof name != 'undefined' ? name : '', 'menubar=yes,toolbar=yes,location=yes,directories=no,status=yes,scrollbars=yes,resizable=yes');

 if (!wnd) return false;

 wnd.focus();

 return true;

}



Array.prototype.random = function(limit)

{

 if (typeof limit == 'undefined' || limit < 0) limit = 1;

 else if (!limit) limit = this.length;

 for (var i = 0, source = this, target = new Array(), n = source.length; i < limit && n > 0; i++)

 {

 do { var index = Math.random(); } while (index == 1);

 index = Math.floor(index * n);

 target.push(source[index]);

 source[index] = source[--n];

 }

 return target;

}