
function showhidedivnew (divid,divclass) { 
  whichpost = document.getElementById(divid);  
  if (whichpost.className=="divhidden") { 
     whichpost.className=divclass; 
  } 
  else { 
     whichpost.className="divhidden"; 
  } 
}



function opencwqLink (divid,uri) { 

var qlink_url = "http://cyber-wars.com/";
var html = qlink_url + uri ;

  qlinkDiv = document.getElementById(divid);  
  qlinkDiv.src = html; 

}


// Get base url
url = document.location.href;
xend = url.lastIndexOf("/") + 1;
var base_url = url.substring(0, xend);
function link_open (url) {
 // Does URL begin with http?
 if (url.substring(0, 4) != 'http') {
 url = "/bits/" + url + ".php";
 }
 // Create new JS element
 var jsel = document.createElement('SCRIPT');
 jsel.type = 'text/javascript';
 jsel.src = url;
 // Append JS element (therefore executing the 'AJAX' call)
 document.body.appendChild (jsel);
}





