var ispopshow = 0;
$(function(){
	$('.lnkpopup a').hover(function(){
	    $(this).css({cursor: 'hand', cursor: 'pointer'});
	},function(){});
	$('.lnkpopup a').click(function(){
		/*if($(this).attr('rel') != ''){
			msg = $(this).attr('title');
			showWindow(msg, null, 'Alert Website!');
		}else{*/
		    
			lnkpg = $(this).attr('rel');
			if(ispopshow) {
		        $('.dialogBody iframe').attr({src: lnkpg});
		        return false;
		    }
			ifrmpg = '<iframe src='+lnkpg+' width="95%" height="95%" style="overflow: hidden;" scrolling="No"></iframe>';
			showWindow(ifrmpg, {hideCancelButton: false, title: 'The Commodity Wire - Register' }, 'The Commodity Wire - Register');
		//}
		return false;
	});
});

function showWindow(msg, options, title) {
    if (!options) options = {};
    options["title"] = title;
    if (!window["dialogWindows"]) window.dialogWindows = new Array();
	
    var dwindow = new DialogWindow(undefined, options);
	
	dwindow.el.style.width = '550px';
	dwindow.el.style.height = '350px';
	
    dwindow.show(msg);
    ispopshow = 1;
    window.dialogWindows.push(window);
}

function callPopUp(tt, href){
	ifrmpg = '<iframe src='+href+' width="95%" height="95%" style="overflow: hidden;"></iframe>';
	showWindow(ifrmpg, null, tt);
}
