/*** solve cross domain security woes ***/
var dom = document.domain;
try {
 a = dom.split(".").reverse();
 if(a.length == 1){
  dom = a[0];
 } else if(a.length > 1) {
  dom = a[1]+'.'+a[0];
 }
}
catch(e){throw e;}
/*** close lightbox ***/
function closeBox(){
 document.domain = dom;
 if(window.parent.Lightbox.deactivateBox){
  window.parent.Lightbox.deactivateBox();
 }
}

// print page
function checkPrint() {
 if (window.print) {
  window.print();
 } else {
  window.alert("This page is prepared for print.\n\nClick on OK and use the print function of your browser to print this page.");
 }
}

function chimg(id, img) {
 $(id).src = img;
}

var isIE = (navigator.userAgent.toLowerCase().indexOf('msie') + 1)?true:false;
function scrollToAnchor(a){
    try { $('scrollbar').scrollTop = $(a.split('#')[1]).offsetTop; return false;
    } catch(e){ throw e; }
}
