(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','http://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-44895185-1', 'tjnsa.com'); ga('send', 'pageview'); function exp_clp_user_panel(id) { var elem = id.nextSibling; while(elem.nodeType != 1){ elem = elem.nextSibling; } if(elem.style.display == ''){ id.style.backgroundColor = 'white'; elem.style.display = 'block'; id.style.color = 'black'; } else{ id.style.backgroundColor = ''; elem.style.display = ''; id.style.color = ''; } } //-----------------------Expand & Collapse Volumes list function exp_clp_volumes(id) { var elem = id.nextSibling; while(elem.nodeType != 1){ elem = elem.nextSibling; } if(elem.style.display == ''){ id.style.backgroundImage = "url(images/minus.png)"; elem.style.display = 'block'; } else{ id.style.backgroundImage = "url(images/plus.png)"; elem.style.display = ''; } } //-----------------------Login Form Validation function Inint_AJAX() { try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE try { return new XMLHttpRequest(); } catch(e) {} //Native Javascript alert("XMLHttpRequest not supported"); return null; }; function check_fields() { var req = Inint_AJAX(); req.onreadystatechange = function () { if (req.readyState==4) { if (req.status==200) { if(req.responseText == 'success') window.location = 'index-3.html'; else document.getElementById('login_msg').innerHTML=req.responseText; //retuen value } } }; var username = document.Login.username.value; var password = document.Login.password.value; var type = document.Login.type.value; req.open("GET.html", "includes/codes/login_ajax076c.html?u="+username+"&p="+password+"&t="+type); //make connection req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); // set Header req.send(null); //send value } String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,''); } //-----------------------Search section function chk_src_from() { var All = document.search.src_all.value.trim(); var Author = document.search.src_author.value.trim(); var Title = document.search.src_title.value.trim(); var msg = ''; if( (All.length<1) && (Author.length<1) && (Title.length<1) ) { alert('Enter search keyword'); return false; } else { if(All.length<4 && All.length>0) msg = "'All fields' Must be more than 4 word\n"; if(Author.length<3 && Author.length>0) msg += "'Author' Must be more than 3 word\n"; if(Title.length<4 && Title.length>0) msg += "'Title' Must be more than 4 word\n"; if(msg != ''){ alert(msg); return false; } } return true; } .