var opt; var winW = 630, winH = 460; var NID; function GD(obj){ NID = obj.parentNode.id; opt = "info"; //alert(NID); //reconfig(); ajaxSearch(NID); } function GX(obj){ NID = obj.parentNode.id; opt = "url"; //reconfig(); ajaxSearch(NID); } function reconfig(){ var request2 =''; var message2 = newElement('message', request2 ); var soapMessage2 = messageToSOAP(message2); makeRequest(soapMessage2); } function windowSize(){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } } function getwindowHeight(){ var Height; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { Height = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; Height = document.body.offsetHeight; } return Height; } } function newwindows(url){ if(url!=''){ windowSize(); window.open(url,'mywindow',winW+','+winH+','+'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); } else{ alert("NO URL AVAILABLE"); } //document.body.style.cursor = "default"; //document.body.style.cursor = "default"; } function newwin(nameList,valueList){ var newwindo; var htm="Metadata Element Detail"; htm+=""; var internalElement = new Array(); for(var i =0;i"+valueList[i]; } else{ if(valueList[i].length>=200){ htm+="
"+nameList[i]+""+valueList[i].substr(0,200)+" ..."; } else{ htm+="
"+nameList[i]+""+valueList[i]; } } } else{ internalElement.push(i);} } for(var i =0; i"+valueList[num]; } else{ if(valueList[num].length>=200){ htm+="
"+nameList[num]+""+valueList[num].substr(0,200)+" ..."; } else{ htm+="
"+nameList[num]+""+valueList[num]; } } } htm+="

"; newwindo=window.open('','mywindow',winW+','+winH+','+'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); //newwindo=window.open('','mywindow','460','630','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); newwindo.document.write(htm); newwindo.document.close(); //document.body.style.cursor = "default"; } function ajaxSearch(request) { //alert("wait"); //alert("This process takes a few seconds"); //alert("done"); //document.body.style.cursor = "wait"; var bodyTag = document.getElementsByTagName('body'); var collection = (bodyTag[0].getAttribute('id')); request = 'HASH'+request; docID = newElementAtt('param', '', new Array('name', 'value'), new Array('metadata', 'all') ) ; paramList = newElement('paramList',docID); NodeID = newElementAtt('documentNode', '', new Array('nodeID'), new Array(request) ) ; documentNodeList = newElement('documentNodeList',NodeID); request = newElementAtt5('request', paramList,documentNodeList, new Array('lang', 'to', 'type'), new Array('en',collection+'/DocumentMetadataRetrieve', 'process' ) ); message = newElement('message', request ); soapMessage = messageToSOAP(message); makeRequest(soapMessage); //loadAsync(soapMessage); //alert(soapMessage); //alert("Please wait..."); } function newElementAtt5(name, content,content2, nameArray, valueArray) { e = '<' + name + ' ' ; for (i=0; i < nameArray.length; i++) { e += newAttribute(nameArray[i], valueArray[i]) } e += '>' + content+content2; e += ''; return e; } function messageToSOAP(message) { soapBody = '' + message + '' soap = '' + soapBody + '' x= '' + soap; return x; } function newElement(name, content) { e = '<' + name + '>' + content; e += ''; return e; } function newElementAtt(name, content, nameArray, valueArray) { e = '<' + name + ' ' ; for (i=0; i < nameArray.length; i++) { e += newAttribute(nameArray[i], valueArray[i]) } e += '>' + content; e += ''; return e; } function newAttribute(name, value) { return ' ' + name + '="' + value + '"'; } function makeRequest(postData){ YAHOO.util.Connect.initHeader('SOAPAction','http://tempuri.org/GetMagnetometerStation',true); var request = YAHOO.util.Connect.asyncRequest('POST', '/greenstone3/services/localsite', callback, postData); } var handleSuccess = function(o){ //document.body.style.cursor='wait'; //alert(o.responseText); //document.body.style.cursor = "default"; var nameList = new Array(); var valueList = new Array(); var xmldoc = o.responseXML; var nodes = xmldoc.getElementsByTagName('metadata'); var mesg = ""; var msg = ""; var urllocation =""; //alert(o.responseText); for(var i=0; i