function OpenWin(url, w, h) {
	props=window.open(url, 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width='+ w +', height='+ h +', left = 150, top = 50');
}

/* Ajax code */
var http = createRequestObject();
var request_;
var browser = navigator.appName;

/*function createRequestObject(){
if(browser == "Microsoft Internet Explorer"){
	request_ = new ActiveXObject("Microsoft.XMLHTTP");
} else {
	request_ = new XMLHttpRequest();
}
	return request_;
}*/

//From: http://www.webpasties.com/xmlHttpRequest
function createRequestObject(){
	var xmlhttp;

/*@cc_on
	@if (@_jscript_version >= 5)
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
 			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}
@else
	xmlhttp = false;
@end @*/

 	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
   			xmlhttp = new XMLHttpRequest();
		} catch(e) {
			xmlhttp = false;
		}

	}
	return xmlhttp;
}
var t;
function Get_Data(b){
t=b;
	bid = document.getElementById('content_'+ b);

	if (bid.style.display=='none') {
		bid.style.display='';
		http.open('get', 'book_index.php?t='+ b);
		http.onreadystatechange = handleInfo;
		http.send(null);
	}else{
		bid.style.display='none';
	}
}

function handleInfo(){
	if(http.readyState == 1){
		document.getElementById('content_'+ t).innerHTML = 'تحميل ...';
	}
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('content_'+ t).innerHTML = response;
	}
}