// JScript File

/***********************************************
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.

var rootdomain="http://"+window.location.hostname

function ajaxinclude(url,container) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
writecontent(page_request,container)
}

function writecontent(page_request,container)
{
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
{
    if(container==null){
    document.write(page_request.responseText)
    }
    else{
    document.getElementById(container).innerHTML=page_request.responseText
    }
}
}


//Navzie Function for ModalPopup to open External pages in an iFrame
function openModal(url,width,height)
{
document.getElementById('modalFrame').src=url;
document.getElementById('modalFrame').width=width-1;
document.getElementById('modalFrame').height=height-1;
$('#basicModalContent').modal({
  containerCss: {
    height: height+'px',
    width: width+'px',
    padding:'0px'
  },
onOpen: function (dialog) {
  dialog.overlay.fadeIn('fast', function () {
    dialog.container.slideDown('slow', function () {
      dialog.data.fadeIn('slow');
    });
  });
},
onClose: function (dialog) {
  dialog.data.fadeOut('slow', function () {
    dialog.container.slideUp('slow', function () {
      dialog.overlay.fadeOut('fast', function () {
        $.modal.close(); // must call this!
      });
    });
  });
}

}) //modal call ends

} //function ends


//Navzie Function for ToolTip
$(function() {
$("#withMyTip fieldset").tooltip({
	bodyHandler: function() {
		return $($(this).attr("id")).html();
	},
	showURL: false
});
});

