function ctc(qry) {
    window.open('/contact/?id='+ qry ,'_blank' ,'width=700,height=400,scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no,location=no');
    $('#contact').removeAttr('onclick').removeAttr('href');
}
function getQryVal(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
    if (pair[0] == variable) {
        return pair[1];
    }
  } 
}
function getObj(id){
	return document.all ? document.all[id] : document.getElementById(id);
}
function getForm(id){
	return document.forms ? document.forms[id] : getObj(id);
}

function emailIt(id){
  try{
        var eTDMain = getObj(id);
        var mailto_link = 'mailto:?subject='+ document.title +'&body='+document.location;
        var win = window.open(mailto_link,'');
        if (win && win.open &&!win.closed)
         win.close();
     }
   catch(e){}
}

function bookmarkIt(){

 try{
      if (window.sidebar)
        window.sidebar.addPanel(document.title, document.location,"");
      else if( document.all )
        window.external.AddFavorite( document.location, document.title);
      else
        return true;
    }
   catch(e){}
}

function printIt(id){
    try{
       var eTDMain = getObj(id);
       var oWindow = window.open('print','','');
       var strTDMain = '';
       strTDMain+="<html><head><title>"+document.title+"</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head>";
       strTDMain+='<body><div title="Click For Change Page Direction!" dir="ltr" onclick="javascript:if(this.dir==\'rtl\')this.dir=\'ltr\';else this.dir=\'rtl\';" style="margin:20px;font-family: tahoma,arial; font-size: 12px; line-height: 140%;">';
       strTDMain += eTDMain.innerHTML;
       strTDMain+="</div></body></html>";
       oWindow.document.write(strTDMain);
   }
   catch(e){/*alert(e.message);*/}
}

