// --- COMMON JS FILE function openWin( windowURL, windowName, windowFeatures ) { return window.open( windowURL, windowName, windowFeatures ) ; } function MMap(Long, Lat, Zoom) { var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.centerAndZoom(new GPoint(Long,Lat), Zoom); var point = new GPoint (Long, Lat) var marker = createMarker(point, 1); map.addOverlay(marker); } function scbg(objRef, state) { objRef.style.backgroundColor = (1 == state) ? '#EEEEEE' : '#FFFFFF'; return; } function createMarker(point, number) { var marker = new GMarker(point); // Show this marker's index in the info window when it is clicked //var html = new GMap(document.getElementById("Map_Pointer")); // var html = "DEK International
2225 Ringwood Avenue
San Jose
CA. 95131

Phone +1 408 954 8582
Fax +1 408 954 8717"; var html = "DEK International"; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } function MakeMap() { var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.centerAndZoom(new GPoint(-2.513809,50.664696), 6); } function go(URL) { self.location.href = URL; } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 0) { document.getElementById("notesview").innerHTML = ""; //document.getElementById("viewmsg").innerHTML = ""; } } reSpace = new RegExp(" ", "g") function rightString(fullString, subString){ if (fullString.indexOf(subString) == "1"){ return ""; } else { return(fullString.substring(fullString.indexOf(subString)+subString.length, fullString.length)); } } function leftBackString(fullString, subString) { if (fullString.lastIndexOf(subString) == "-1") { return ""; } else { return fullString.substring(0, fullString.lastIndexOf(subString)); } } function leftString(fullString, subString) { if (fullString.indexOf(subString) == "-1") { return ""; } else { return (fullString.substring(0, fullString.indexOf(subString))); } } function rightBackString(fullString, subString) { if (fullString.lastIndexOf(subString) == "-1") { return ""; } else { return fullString.substring(fullString.lastIndexOf(subString)+1, fullString.length); } } function replaceSubstring(fullS,oldS,newS) { for (var i=0; i 0 ) { // Find the beginning of the string begin = queryString.indexOf ( parameterName ); // If the parameter name is not found, skip it, otherwise return the value if ( begin != -1 ) { // Add the length (integer) to the beginning begin += parameterName.length; // Multiple parameters are separated by the "&" sign end = queryString.indexOf ( "&" , begin ); if ( end == -1 ) { end = queryString.length } // Return the string returnstring = queryString.substring ( begin, end ) if (returnstring != "" ) { return (returnstring); } } // Return "null" if no parameter has been found return "-"; } } function trim(aStr) { return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "") } function numbersOnly() { // test to see if a numeric character was pressed // must be called in the onKeyPress event of the field to be tested if (event.keyCode < 48 || event.keyCode > 57 ) // if the keypressed is between ascii 48 and 57, its a number return false //end if } //end function numbersOnly function searchCharsOnly() { // test to see if an odd character was pressed // must be called in the onKeyPress event of the field to be tested if ((event.keyCode > 33 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 96) ||(event.keyCode > 122) ) return false //end if } //end function numbersOnly function validate(Form,vArr){ var g = new Array() var Msg="Please enter the values for the following \n"; var Msg1=Msg; for(i=0;i"; break; case "radio": x=Field.name x=x.replace("[0]","") x=eval("Form."+x) var chk=false; for(n=0;n"; break; case "select-one": if((Field.selectedIndex)!=-1){ if(trim(Field.options[Field.selectedIndex].text)==""||Field.options[Field.selectedIndex].text==null){ Msg=Msg+Field.title+"\n"; //Msg=Msg+Field.title+"
"; } }else Msg=Msg+Field.title+"\n"; //Msg=Msg+Field.title+"
"; break; }//Switch cas end }//For end if (Msg!=Msg1){ alert(Msg); return(false); } else return(true); } function Get_Cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null; var end = document.cookie.indexOf(";",len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len,end)); } function Set_Cookie(name,value,expires,path,domain,secure) { var cookieString = name + "=" +escape(value) + ( (expires) ? ";expires=" + expires.toGMTString() : "") + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ( (secure) ? ";secure" : ""); document.cookie = cookieString; } function Delete_Cookie(name,path,domain) { if (Get_Cookie(name)) document.cookie = name + "=" + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-70 00:00:01 GMT"; } var today = new Date(); var zero_date = new Date(0,0,0); today.setTime(today.getTime() - zero_date.getTime()); var cookie_expire_date = new Date(today.getTime() + (8 * 7 * 86400000)); function setVisitorID() { if (Get_Cookie('VisitorID')) { var VisitorID = Get_Cookie('VisitorID'); }else{ Set_Cookie('VisitorID',Math.random(),cookie_expire_date); } } function setSessionID() { if (!Get_Cookie('SessionID')) Set_Cookie('SessionID',Math.random()); } function getSelVal(select) { var r = new Array(); for (var i = 0; i < select.options.length; i++) if (select.options[i].selected) r[r.length] = select.options[i].value; //alert(r); return r; } function setSoftware() { if (!Get_Cookie('SoftwareID')) { // var select = this.form.select1; //software = getSelVal(document.forms[0].choices); //software = getSelVal(document.forms[0]. software = document.getElementById('selection'); //var txtSelectedValuesObj = document.getElementById('txtSelectedValues'); Set_Cookie('SoftwareID',software); // Set_Cookie('SoftwareID',txtSelectedValuesObj); } } // Resize images with zoom in and out funtionality function scale() { var img = this.getElementsByTagName('img')[0]; img.src = img.smallSrc; // if we are scaling up, scale down everything else if (img.state == 'small') { var links = document.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) if ((links[i].className == 'livethumbnail') && (links[i].getElementsByTagName('img')[0].state == 'large') && (links[i] != this)) links[i].onclick(); } if (! img.preloaded) { img.preloaded = new Image(); img.preloaded.src = img.largeSrc; } var interval = window.setInterval(scaleStep, 10); return false; function scaleStep() { var step = 10; var width = parseInt(img.getAttribute('width')); var height = parseInt(img.getAttribute('height')); if (img.state == 'small') { width += step; height += Math.floor(step * img.ratio); img.setAttribute('width', width); img.setAttribute('height', height); if (width > img.largeWidth - step) { img.setAttribute('width', img.largeWidth); img.setAttribute('height', img.largeHeight); img.setAttribute('src', img.largeSrc); window.clearInterval(interval); img.state = 'large'; } } else { width -= step; height -= Math.floor(step * img.ratio); img.setAttribute('width', width); img.setAttribute('height', height); if (width < img.smallWidth + step) { img.setAttribute('width', img.smallWidth); img.setAttribute('height', img.smallHeight); img.src = img.smallSrc; window.clearInterval(interval); img.state = 'small'; } } } } var loaded_script = true;