__changeINT = function(int_div_i){ var int_divs = new Array('int_url','int_fox','int_bookmark','int_about'); __swapINT(int_divs,int_div_i,4,'int_menu_s'); }

var __int_formControl = function(v,x,n){
	if(v == 1){ var dFormItem = document.getElementById(x).elements;
		if(n == '') n = dFormItem.length;
		for(i=0;i<n;i++){ dFormItem[i].disabled = false; }
			}
	else{ var dFormItem = document.getElementById(x).elements;
		if(n == '') n = dFormItem.length;
		for(i=0;i<n;i++){ dFormItem[i].disabled = true; }
			}
	};
	
__swapINT = function(INT_divs,INT_div_i,INT_div_n,INT_style){
	with(INT_divs){
			for (i=0; i<INT_div_n; i++){
					if(INT_divs[i] == INT_div_i){ document.getElementById(INT_divs[i]).style.display = 'block';
						if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_' + INT_divs[i]).className = INT_style; __int_set_cookie('__int_tab',INT_divs[i]); }
					}else{ document.getElementById(INT_divs[i]).style.display = 'none';
						if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_' + INT_divs[i]).className = ''; } }
				}
			}
}

__swapRSM = function(INT_divs,INT_div_i,INT_div_n,INT_style){
	with(INT_divs){
			for (i=0; i<INT_div_n; i++){
					if(INT_divs[i] == INT_div_i){ document.getElementById(INT_divs[i]).style.display = 'block';
						if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_'+INT_divs[i]).className = INT_style + '_s'; }
					}else{ document.getElementById(INT_divs[i]).style.display = 'none';
						if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_'+INT_divs[i]).className = INT_style; }
							}
				}
			}
}

__swap_i_INT = function(INT_divs,INT_div_i,INT_div_n,INT_style){
	with(INT_divs){
			for (i=0; i<INT_div_n; i++){
					if(INT_divs[i] == INT_div_i){
							document.getElementById(INT_divs[i]).style.display = 'block';
							if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_'+INT_divs[i]).className = INT_style + '_on'; }
					}else{
							document.getElementById(INT_divs[i]).style.display = 'none';
							if(document.getElementById('c_' + INT_divs[i])){ document.getElementById('c_'+INT_divs[i]).className = INT_style + '_off'; }
							}
				}
			}
}

var _cStyle = function(x,y){ if(document.getElementById(x)){ document.getElementById(x).className = y; }};

__int_Menu = function(INT_divs){
		var int_divs = new Array('int_url_single','int_url_custom','int_url_bulk');
			for (i=0; i<3; i++){
				if(int_divs[i] == INT_divs){ document.getElementById(int_divs[i]).style.display = 'block'; 
							this._cStyle(int_divs[i]+ '_li','int_menu_s');							
							this.__int_set_cookie('__int_url_tab',int_divs[i]);
					}else{ document.getElementById(int_divs[i]).style.display = 'none'; 
							this._cStyle(int_divs[i]+ '_li','');
							}
				}
			
}

var __helpDiv = function(x){ var xdiv = document.getElementById(x);
		if(xdiv.style.display == 'block'){ xdiv.style.display = 'none'; }else{ xdiv.style.display = 'block'; }
	}
	
__openWin = function(a,w,h,rz){
		var rz = (rz)?rz:'no';
		var x = (screen.width)?(screen.width-800)/2:0;
		var y = (screen.height)?(screen.height-550)/2:0;
		window.open(a,'newWin','width='+w+',height='+h+',top='+y+',left='+x+'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable='+rz);
	}

__en_64 = function(input) {
	var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0;
   do { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++);
		enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63;
		if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) {  enc4 = 64; }
		output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);
   } while (i < input.length);
   
   return output;
}


__clipboardCopy = function(v){ if(window.clipboardData){ window.clipboardData.setData("Text",v); }else{ var via_flash = 'flash_copy';
    if(!document.getElementById(via_flash)) { var flashDiv = document.createElement('div'); flashDiv.id = via_flash; document.body.appendChild(flashDiv); }
    document.getElementById(via_flash).innerHTML = '';
    var flash_copier = '<embed src="'+imgURL+'_copy2clipboard.swf" FlashVars="clipboard='+escape(v)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(via_flash).innerHTML = flash_copier;
  }
}

/*__clipboardCopy = function(v){
	var v = document.getElementById(v);
	copy_V = v.createTextRange();
	copy_V.execCommand("Copy")
	//copied = window.clipboardData.getData("Text");
	//alert(copied);
}*/

__int_set_cookie = function(a,b){ var cookie_date = new Date(); cookie_date.setTime ( cookie_date.getTime()+360000000000);
		document.cookie = a +"=" + escape(__en_64(b)) + "; expires = " + cookie_date.toGMTString() + "; path = /";
}

__copyAtribute = function(p,c,pd){ var parentObj = document.getElementById(p);var childObj = document.getElementById(c);
		if(parentObj.clientWidth){ childObj.style.width = eval(parentObj.clientWidth - pd) + 'px'; childObj.style.height = eval(parentObj.clientHeight - pd) + 'px';
		}else{ childObj.style.width = eval(parentObj.offsetWidth - pd) + 'px'; childObj.style.height = eval(parentObj.offsetHeight - pd) + 'px';
			}
	}

__int_error = function(a){
		if(document.getElementById(a)){ document.getElementById(a).style.display = 'none'; }
	}

__intLogin = function(a,b){ var divA = document.getElementById(a); var divB = document.getElementById(b);
	if(divA.style.display != 'none'){ divA.style.display = 'none'; divB.style.display = 'block'; __int_set_cookie('__int_login','int_login'); }
	//else{ divA.style.display = 'block'; divB.style.display = 'none'; }
}

__intReport = function(x,y){ var divA = document.getElementById(x); var divB = document.getElementById(y);
	if(divA.style.display != 'none'){ divA.style.display = 'none'; divB.style.display = 'block'; }
	else{ divA.style.display = 'block'; divB.style.display = 'none';  }
}

__intPreview = function(x,a,b){ var divA = document.getElementById(x + a); var divB = document.getElementById(x + b);
	if(divA.style.display != 'none'){ divA.style.display = 'none'; divB.style.display = 'block';  __int_set_cookie('__int_preview',b); }
	else{ divA.style.display = 'block'; divB.style.display = 'none';  __int_set_cookie('__int_preview',a); }
}

__int_checkLogin = function(){ var x = document.int_login_form;
	if(x.int_email.value == ''){ x.int_email.focus(); x.int_email.className = 'int_type_y'; return false; }
	if(x.int_password.value == ''){ x.int_password.focus(); x.int_password.className = 'int_type_y'; return false; }
	if(x.int_password.value.length < 4){ alert('Password cannot be less than 4 characters.'); x.int_password.focus(); x.int_password.className = 'int_type_y'; return false; }
}

__int_checkCPLogin = function(){ var x = document.int_cp_login_form;
	if(x.int_user.value == ''){ x.int_user.focus(); x.int_user.className = 'int_type_y'; return false; }
	if(x.int_password.value == ''){ x.int_password.focus(); x.int_password.className = 'int_type_y'; return false; }
	if(x.int_password.value.length < 4){ x.int_password.focus(); x.int_password.className = 'int_type_y'; return false; }
}

__changeOption = function(target_URL,sel_Obj,restore){
  eval(target_URL+".location='"+sel_Obj.options[sel_Obj.selectedIndex].value+"'");
  if (restore) sel_Obj.selectedIndex=0;
}

var INT_jax_r = new sack();
	var _r_onLoading = function(){ var int_modal = document.getElementById('int_modal'); __copyAtribute('rept_form','int_modal',5); int_modal.style.display = "block"; };
	var _r_onCompleted = function(){ __int_formControl(1,'obj_report','');
			if(INT_jax_r.response == 1){ var int_modal = document.getElementById('int_modal_x');
				int_modal.innerHTML = "<div align='center' class='modal_rsp'>Thank you for sending us a 'note of missuse' of this service. Your report was received and we shall look into it as soon as possible.</div>";}
		};
r_processor = function(){
	var postForm = document.getElementById('obj_report');
	if(postForm.obj_int_url.value == ""){ alert("Please enter the INTURL you are about to report!"); return false; }
	if(isNaN(postForm.obj_int_url.value)){ alert("Please enter only the integer value of the INTURL you are about to report!"); return false; }
	else{ this.__int_formControl(0,'obj_report','');
		obj_cat = ((postForm.obj_spam.checked)?'SPAM ':'') + ((postForm.obj_illegal.checked)?'ILLEGAL ':'') + ((postForm.obj_others.checked)?'OTHERS':'');
		INT_jax_r.setVar("obj_inturl", postForm.obj_int_url.value);
		INT_jax_r.setVar("obj_cat", obj_cat);
		INT_jax_r.setVar("obj_comment", postForm.obj_comment.value);
		INT_jax_r.requestFile = './api/?abuse';
		INT_jax_r.method = 'POST';
		INT_jax_r.onLoading = this._r_onLoading;
		INT_jax_r.onCompletion = this._r_onCompleted;
		INT_jax_r.runAJAX(); 
		}
	}
	
var INT_jax_opt = new sack();
	var _opt_onLoading = function(){ var div_opt = document.getElementById('int_opt_div'); 
		div_opt.innerHTML = "<p class='int_ajax_p' style='font-style:italic;color:#FF0000'>Optimizing table ... please wait</p>"; };
	var _opt_onCompleted = function(){
			if(INT_jax_opt.response == 1){
				document.getElementById('int_opt_div').innerHTML = "<p class='int_ajax_p' style='color:#0000FF'>TABLE WAS OPTIMIZED</p>";
				setTimeout('int_wipe(\'int_opt_div\')',3000);
				}
		};
__int_opt = function(t_name){
	var x = confirm("Are you sure you want to do this?");
	if(x){
	with(t_name){
		INT_jax_opt.setVar("t_name", t_name);
		INT_jax_opt.requestFile = '../api/?opt';
		INT_jax_opt.method = 'POST';
		INT_jax_opt.onLoading = this._opt_onLoading;
		INT_jax_opt.onCompletion = this._opt_onCompleted;
		INT_jax_opt.runAJAX(); 
		}
	}
	}

var INT_jax_act = new sack();
	var _act_onLoading = function(){ var div_act = document.getElementById('int_act_div'); 
		div_act.innerHTML = "<p class='int_ajax_p' style='font-style:italic;color:#FF0000'>Taking action ... please wait</p>"; };
	var _act_onCompleted = function(){
			if(INT_jax_act.response){
				document.getElementById('int_act_div').innerHTML = "<p class='int_ajax_p' style='color:#0000FF'>"+INT_jax_act.response+"</p>";
				setTimeout('int_wipe(\'int_act_div\')',5000);
				}
		};
__int_action = function(act_name){
	var x = confirm("Are you sure you want to do this?");
	if(x){
	with(act_name){
		INT_jax_act.setVar("action", act_name);
		INT_jax_act.requestFile = '../sitemaps/?act';
		INT_jax_act.method = 'POST';
		INT_jax_act.onLoading = this._act_onLoading;
		INT_jax_act.onCompletion = this._act_onCompleted;
		INT_jax_act.runAJAX(); 
		}
	}
	}

var INT_jax_w = new sack();
	var int_wipe = function(a){ var b = document.getElementById(a); b.innerHTML = ""; };
	
	var _w_onLoading = function(){ var div_w = document.getElementById('int_ajax_w'); 
		div_w.innerHTML = "<p class='int_ajax_p'><img src='" + imgURL + "processing.gif' />&nbsp;Creating ... please wait</p>"; };
	var _w_onCompleted = function(){ __int_formControl(1,'inturlForm_w','');
			if(INT_jax_w.response){
				document.getElementById('longURL_w').value = 'http://';  }
		};

w_processor = function() {
	var postForm = document.getElementById('inturlForm_w');
	if(postForm.longURL_w.value == "" || postForm.longURL_w.value == "http://"){ postForm.longURL_w.className = "int_type_text_e"; return false; }
	else{ this.__int_formControl(0,'inturlForm_w','');
		INT_jax_w.setVar("longURL_w", postForm.longURL_w.value);
		INT_jax_w.requestFile = './api/';
		INT_jax_w.method = 'POST';
		INT_jax_w.element = 'int_ajax_w';
		INT_jax_w.onLoading = this._w_onLoading;
		INT_jax_w.onCompletion = this._w_onCompleted;
		INT_jax_w.runAJAX(); 
		}
}
var INT_jax_x = new sack();
	var _x_onLoading = function(){ var div_x = document.getElementById('int_ajax_x'); 
		div_x.innerHTML = "<p class='int_ajax_p'><img src='" + imgURL + "processing.gif' />&nbsp;Creating ... please wait</p>"; };
	var _x_onCompleted = function(){ __int_formControl(1,'inturlForm_x','');
			if(INT_jax_x.response == 1){
				document.getElementById('longURL_x').value = 'http://';
				int_wipe('int_ajax_x');
				setTimeout('__reloadINT()',1000); }
			if(INT_jax_x.response == 0){
				document.getElementById('int_ajax_x').innerHTML = '<span class="int_ajax_er">This longURL already exist!</span>';setTimeout('int_wipe(\'int_ajax_x\')',9000);
				}
		};

x_processor = function() {
	var postForm = document.getElementById('inturlForm_x');
	if(postForm.longURL_x.value == "" || postForm.longURL_x.value == "http://"){ postForm.longURL_x.className = "int_type_text_e"; return false; }
	else{ this.__int_formControl(0,'inturlForm_x','');
		INT_jax_x.setVar("longURL_x", postForm.longURL_x.value);
		INT_jax_x.requestFile = './api/';
		INT_jax_x.method = 'POST';
		//INT_jax_x.element = 'int_ajax_x';
		INT_jax_x.onLoading = this._x_onLoading;
		INT_jax_x.onCompletion = this._x_onCompleted;
		INT_jax_x.runAJAX(); 
		}
}
var INT_jax_y = new sack();
	var _y_onLoading = function(){ var div_y = document.getElementById('int_ajax_y'); 
		div_y.innerHTML = "<p class='int_ajax_p'><img src='" + imgURL + "processing.gif' />&nbsp;Creating ... please wait</p>"; };
	var _y_onCompleted = function(){ __int_formControl(1,'inturlForm_y','');
			if(INT_jax_y.response == 1){
				document.getElementById('longURL_y').value = 'http://';
				int_wipe('int_ajax_y');
				setTimeout('__reloadINT()',1000); }
			if(INT_jax_y.response == -2){
				document.getElementById('int_ajax_y').innerHTML = '<span class="int_ajax_er">INTURL has already been generated for this long URL! Please check your list.</span>';
				setTimeout('int_wipe(\'int_ajax_y\')',9000);
				}
			if(INT_jax_y.response == -1){
				document.getElementById('int_ajax_y').innerHTML = '<span class="int_ajax_er">Only numeric value is allowed!</span>'; setTimeout('int_wipe(\'int_ajax_y\')',9000);
				}
			if(INT_jax_y.response == 0){
				document.getElementById('int_ajax_y').innerHTML = '<span class="int_ajax_er">This custom request already exist!</span>'; setTimeout('int_wipe(\'int_ajax_y\')',9000);
				}
		};

y_processor = function() {
	var postForm = document.getElementById('inturlForm_y');
	if(postForm.longURL_y.value == "" || postForm.longURL_y.value == "http://"){ postForm.longURL_y.className = "int_type_text_e"; return false; }
	if(postForm.customINT.value == ""){ postForm.customINT.className = "int_type_text_e"; return false; }
	if(isNaN(postForm.customINT.value)){ alert('Only numeric value is allowed in the custom input!'); return false; }
	else{ this.__int_formControl(0,'inturlForm_y','');
		INT_jax_y.setVar("longURL_y", postForm.longURL_y.value);
		INT_jax_y.setVar("customINT", postForm.customINT.value);
		INT_jax_y.requestFile = './api/';
		INT_jax_y.method = 'POST';
		INT_jax_y.onLoading = this._y_onLoading;
		INT_jax_y.onCompletion = this._y_onCompleted;
		INT_jax_y.runAJAX(); 
		}
}
var INT_jax_z = new sack();
	var _z_onLoading = function(){ var div_z = document.getElementById('int_ajax_z'); 
		div_z.innerHTML = "<p class='int_ajax_p'><img src='" + imgURL + "processing.gif' />&nbsp;Creating ... please wait</p>"; };
	var _z_onCompleted = function(){
		if(INT_jax_z.response){
			document.getElementById('longURL_z').value = '';
			int_wipe('int_ajax_z');
			setTimeout('__reloadINT()',1000); __int_formControl(1,'inturlForm_z',''); }
		};

z_processor = function() {
	var postForm = document.getElementById('inturlForm_z');
	if(postForm.longURL_z.value == ""){ postForm.longURL_z.className = "int_type_text_e"; return false; }
	else{ this.__int_formControl(0,'inturlForm_z','');
		INT_jax_z.setVar("longURL_z", postForm.longURL_z.value);
		INT_jax_z.requestFile = './api/';
		INT_jax_z.method = 'POST';
		INT_jax_z.onLoading = this._z_onLoading;
		INT_jax_z.onCompletion = this._z_onCompleted;
		INT_jax_z.runAJAX(); 
		}
}

var INT_jax_e = new sack();
	var _e_onLoading = function(){ var div_e = document.getElementById('int_ajax_e'); 
		div_e.innerHTML = "<p style='color:#FFF;margin:0;padding:0;'><img src='"+ imgURL +"processing.gif' />&nbsp;Updating ... please wait</p>"; };
	var _e_onCompleted = function(){
			if(INT_jax_e.response == 1){
				div_e = document.getElementById('int_ajax_e');
				div_e.innerHTML = "<p style='color:#FFF;margin:0;padding:0;'>Updated successfully!</p>";
				setTimeout('int_wipe(\'int_ajax_e\')',3000); 
				setTimeout('__intModalExist()',4000);
				setTimeout('__reloadINT()',4000);
				}
		};

e_processor = function() {
	var postForm = document.getElementById('inturlForm_e');
	if(postForm.longURL_e.value == ""){ postForm.longURL_e.className = "int_type_text_e"; return false; }
	else{
		INT_jax_e.setVar("longURL_e", postForm.longURL_e.value);
			this.__int_formControl(0,'inturlForm_e','');
		INT_jax_e.setVar("int_ID_e", postForm.int_ID_e.value);
		INT_jax_e.setVar("tag_e", postForm.tag_e.value);
		INT_jax_e.requestFile = './api/?inturl_edit';
		INT_jax_e.method = 'POST';
		INT_jax_e.onLoading = this._e_onLoading;
		INT_jax_e.onCompletion = this._e_onCompleted;
		INT_jax_e.runAJAX(); 
		}
}

var INT_jax_e_cp = new sack();
	var _e_cp_onLoading = function(){ var div_e = document.getElementById('int_ajax_e'); 
		div_e.innerHTML = "<p style='color:#FFF;margin:0;padding:0;'><img src='" + imgURL + "processing.gif' />&nbsp;Updating ... please wait</p>"; };
	var _e_cp_onCompleted = function(){
			if(INT_jax_e_cp.response == 1){
				div_e = document.getElementById('int_ajax_e');
				div_e.innerHTML = "<p style='color:#FFF;margin:0;padding:0;'>Updated successfully!</p>";
				setTimeout('int_wipe(\'int_ajax_e\')',3000); 
				setTimeout('__intModalExist()',4000);
				}
		};

e_cp_processor = function() {
	var postForm = document.getElementById('inturlForm_e');
	if(postForm.longURL_e.value == ""){ postForm.longURL_e.className = "int_type_text_e"; return false; }
	else{
		INT_jax_e_cp.setVar("longURL_e", postForm.longURL_e.value);
			this.__int_formControl(0,'inturlForm_e','');
		INT_jax_e_cp.setVar("int_ID_e", postForm.int_ID_e.value);
		INT_jax_e_cp.setVar("tag_e", postForm.tag_e.value);
		INT_jax_e_cp.requestFile = '../api/?inturl_edit_cp';
		INT_jax_e_cp.method = 'POST';
		INT_jax_e_cp.onLoading = this._e_cp_onLoading;
		INT_jax_e_cp.onCompletion = this._e_cp_onCompleted;
		INT_jax_e_cp.runAJAX(); 
		}
}

a_processor = function() {
	var postForm = document.getElementById('inturlForm_a');
	if(postForm.longURL_a.value == ""){ postForm.longURL_a.className = "int_type_text_e"; return false; }
	else{
		
		}
}

__setFd = function(x){ var fd = document.getElementById('intfox_fd_h');	fd.value = x; }

var INT_jax_fox = new sack();
	var _fox_onLoading = function(){ var intfox_code = document.getElementById('intfox_display'); intfox_code.style.display = "block"; };
	var _fox_onCompleted = function(){ __int_formControl(1,'int_fox_form','');
			if(INT_jax_fox.response){ var intfox_code_x = document.getElementById('intfox_display_x'); var intfox_code_y = document.getElementById('intfox_display_y'); 
				intfox_code_x.innerHTML = INT_jax_fox.response; intfox_code_y.style.display = "block"; }
			document.int_fox_form.reset();
		};
__createINTFOX = function(){
	var postForm = document.getElementById('int_fox_form');
	if((postForm.intF_sfx.value != '') && isNaN(postForm.intF_sfx.value)){ alert("Please enter only the integer value of your SFX ID!"); return false; }
	if((postForm.intF_wd.value == '') || isNaN(postForm.intF_wd.value)){ alert("Please enter a valid value for the width of the bar.\n This must be an integer!"); return false; }
	if(postForm.intF_bg.value == ''){ alert("Please select a background color!"); return false; }
	if(postForm.intF_fc.value == ''){ alert("Please select a font color!"); return false; }
	if((postForm.intF_fs.value == '') || isNaN(postForm.intF_fs.value)){ alert("Please enter a valid value for the font size!"); return false; }
	else{ this.__int_formControl(0,'int_fox_form','');
		var intF_msg_c; for(i=0;i<document.int_fox_form.intF_msg.length;i++){if(document.int_fox_form.intF_msg[i].checked==true){intF_msg_c = i;break;}}
		INT_jax_fox.setVar("intF_sfx", postForm.intF_sfx.value);
		INT_jax_fox.setVar("intF_wd", postForm.intF_wd.value);
		INT_jax_fox.setVar("intF_bg", postForm.intF_bg.value);
		INT_jax_fox.setVar("intF_fc", postForm.intF_fc.value);
		INT_jax_fox.setVar("intF_fs", postForm.intF_fs.value);
		INT_jax_fox.setVar("intF_fw", postForm.intF_fw.value);
		INT_jax_fox.setVar("intF_spd", postForm.intF_spd.value);
		INT_jax_fox.setVar("intF_msg", intF_msg_c);
		INT_jax_fox.setVar("intF_mode", 'SFX');
		INT_jax_fox.requestFile = './api/?intfox_code';
		INT_jax_fox.method = 'POST';
		INT_jax_fox.onLoading = this._fox_onLoading;
		INT_jax_fox.onCompletion = this._fox_onCompleted;
		INT_jax_fox.runAJAX(); 
		}
	}
	
var INT_jax_rs = new sack();
	var _intmodal_close = function(){ var int_modal = document.getElementById('int_modal'); int_modal.style.display = "none"; document.getElementById('rs_form').reset();
										var int_modal_x = document.getElementById('int_modal_x');
										int_modal_x.innerHTML = '<div align="center" class="modal_processing" style="color:#FF0000"><img src="'+ imgURL +'loading.gif" border="0" /><br />Submitting, please wait...</div>';
										}
	var _rs_onLoading = function(){ var int_modal = document.getElementById('int_modal'); __copyAtribute('rs_form_div','int_modal',5); int_modal.style.display = "block"; };
	var _rs_onCompleted = function(){ __int_formControl(1,'rs_form',''); var int_modal = document.getElementById('int_modal_x');
			if(INT_jax_r.response == -1){ 
				int_modal.innerHTML = "<img onclick='_intmodal_close()' src='"+ imgURL +"close_bar.gif' alt='Close' border='0' style='cursor:pointer;float:right;' /><div align='center' style='color:#FF0000'>This record already exist!</div>";}
			if(INT_jax_r.response == 0){ 
				int_modal.innerHTML = "<img onclick='_intmodal_close()' src='"+ imgURL +"close_bar.gif' alt='Close' border='0' style='cursor:pointer;float:right;' /><div align='center' style='color:#FF0000'>This fill in the requires fields!</div>";}
			if(INT_jax_r.response == 1){ 
				int_modal.innerHTML = "<img onclick='_intmodal_close()' src='"+ imgURL +"close_bar.gif' alt='Close' border='0' style='cursor:pointer;float:right;' /><div align='center' class='modal_rsp'>Resource was added successfully! You may continue to add another. Thank you.</div>";}
		};
__submitFRS = function(){
	var postForm = document.getElementById('rs_form');
	if(postForm.rs_name.value == ""){ alert("Please enter the resources title!"); return false; }
	if(postForm.rs_desc.value == ""){ alert("Please enter the resources description!"); return false; }
	if(postForm.rs_cat.value == ""){ alert("Please select a category!"); return false; }
	if(postForm.rs_url.value == ""){ alert("Please enter a the resources destination URL!"); return false; }
	else{ this.__int_formControl(0,'rs_form','');
		INT_jax_r.setVar("ars_name", postForm.rs_name.value);
		INT_jax_r.setVar("ars_desc", postForm.rs_desc.value);
		INT_jax_r.setVar("ars_cat", postForm.rs_cat.value);
		INT_jax_r.setVar("ars_cat_b", postForm.rs_cat_b.value);
		INT_jax_r.setVar("ars_url", postForm.rs_url.value);
		INT_jax_r.requestFile = '../api/?add_recources';
		INT_jax_r.method = 'POST';
		INT_jax_r.onLoading = this._rs_onLoading;
		INT_jax_r.onCompletion = this._rs_onCompleted;
		INT_jax_r.runAJAX(); 
		}
	}


intModal = new DHTML_modalMessage();
intModal.setShadowOffset(5);
__intModalOpen = function(url,w,h){	
	intModal.setSource(url);
	intModal.setCssClassMessageBox(false);
	intModal.setSize(w,h);
	intModal.setShadowDivVisible(true);
	intModal.display();
}
__intModalExist = function(){ intModal.close(); }

var __reloadINT = function(){ ajax_loadContent('int_url_list','./api/?inturl_list','int_url_load',''); };
var __reloadINT_pg = function(x,y){ ajax_loadContent('int_url_list',x,y,''); };
var __deleteINT = function(intID){
	var x = confirm("Are you sure you want to delete this INTURL?\nTHIS PROCESS IS IRREVERSIBLE!\nIt is prefered to edit the INTURL content rather than deleting it.\n To continue your delete process, Click 'OK' or 'CANCEL' to stop.")
	if(x){ ajax_loadContent('int_url_list','./api/?inturl_delete;' + intID,'int_url_load',''); } };