home *** CD-ROM | disk | FTP | other *** search
- function Get(field, value){
- var url = document.forms[0].action += '&' + field + '=';
- if (value != null)
- url += value;
- else
- url += 'Yes';
- document.location = url;
- }
-
- function Mesg(Msg){
- if (Msg.length > 0){alert(Msg);}
- }
-
- var composeWindowCount = 0;
- function openWin(url, winName, width, height, features){
- if(is_ie || is_nav){
- var w = screen.availWidth;
- var h = screen.availHeight;
- }
- var leftPos,topPos;
- if((winName.indexOf('GetMail') != -1) && (is_ie))
- leftPos = (w-width)/1.02, topPos = (h-height)/1.08;
- else if(winName.indexOf('GetMail') != -1 && is_nav)
- leftPos = (w-width)/1.86, topPos = (h-height)/1.86;
- else if(is_ie)
- leftPos = (w-width)/2, topPos = (h-height)/2;
- else if(is_nav)
- leftPos = (w-width)/3, topPos = (h-height)/3;
- else
- leftPos = 250, topPos = 250;
- var hWin;
- if(features == "compose"){
- hWin = window.open(url, winName+(composeWindowCount++),'directories=no,location=no,menubar=no,status=no,scrollbars=yes,resizable=yes,titlebars=no,toolbar=no,width=' + width + ',height=' + height+ ',screenX=' + topPos + ',screenY=' + leftPos+',top=' + topPos + ',left=' + leftPos);
- }else if (features == "yes"){
- hWin = window.open(url, winName, 'directories=no,location=no,menubar=no,status=no,scrollbars=yes,resizable=yes,titlebars=no,toolbar=no,width=' + width + ',height=' + height+ ',screenX=' + topPos + ',screenY=' + leftPos+',top=' + topPos + ',left=' + leftPos);
- }else if (features == "no"){
- hWin = window.open(url, winName, 'directories=no,location=no,menubar=no,status=no,scrollbars=no,resizable=no,titlebars=no,toolbar=no,width=' + width + ',height=' + height+ ',screenX=' + topPos + ',screenY=' + leftPos +',top=' + topPos + ',left=' + leftPos);
- }
- if(!hWin.opener){hWin.opener = window;}
- hWin.focus();
- }
-
- function Post(field, value){
- document.forms[0].action += '&' + field + '=';
- if (value != null)
- document.forms[0].action += value;
- else
- document.forms[0].action += 'Yes';
-
- if (typeof(Validate) == 'undefined' || Validate())
- document.forms[0].submit();
- }
-
- function SetOption(name, value){
- for (var i=0; i<document.forms[0].length; i++){
- if (document.forms[0].elements[i].name == name)
- var element = document.forms[0].elements[i];
- }
- if (element == null)
- return;
-
- if (element.type == 'checkbox'){
- if (element.value == value)element.checked = true;
- }else if (element.type == 'radio'){
- for (var i=0; i<document.forms[0].length; i++){
- if (document.forms[0].elements[i].name == name && document.forms[0].elements[i].value == value)document.forms[0].elements[i].checked = true;
- }
- }else if (element.type == 'select-one'){
- for (var i=0; i<element.length; i++){
- var elementValue = element.options[i].value.toLowerCase();var passedValue = value.toLowerCase();
- if ( elementValue == passedValue )element.selectedIndex = i;
- }
- }else if(element.type == 'select-multiple'){
- for (var i=0; i<element.length; i++){
- var elementValue = element.options[i].value.toLowerCase();
- var passedValue = value.toLowerCase();
- if ( elementValue == passedValue )
- element.options[i].selected = true;
- }
- }else if (element.type == 'text'){
- element.value = value;
- }
- }
-
- function SelectAll(){
- for (var i=0;i<document.forms[0].elements.length;i++){
- document.forms[0].elements[i].checked=!document.forms[0].elements[i].checked;
- }
- }
-
- /* List View Functions */
- function Sort(SortKey){
- var F=document.forms[0];
- if (F.Sort.value.indexOf(SortKey) == -1)
- F.Sort.value = SortKey;
- else if (F.Sort.value.indexOf('Rev') == -1)
- F.Sort.value = 'Rev' + SortKey;
- else
- F.Sort.value = SortKey;
- F.submit();
- }
-