function anotherwindowpopup() {

	$('.anotherwindow').click(function(){

        openWin(this.href,this.title,600,this.rel,1,0,1)

        return false;

    });

};





function openWin(url,wname,w,h,resizable,toolbar,scrollbars){

		

		if (h >= (screen.height-30)){

			wh = screen.height-100;

			w += 18;

			scrollbars = 1;

		}else wh = h;

		

		win_set = 'width=' + w;

		win_set += ',height=' + wh;

		win_set += ',resizable=' + resizable;

		win_set += ',toolbar=' + toolbar;

		win_set += ',scrollbars=' + scrollbars;

		win_set += ',fullscreen=no';

		

		swin = window.open(url,wname,win_set);

		swin.focus();

}





$(document).ready(anotherwindowpopup);