// --- 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) { top.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; //** Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com //** Created: Jan 7th, 08'. Last updated: June 7th, 2010 to v1.9 //Version 1.9: June 7th, 2010': //**1) Ajax content support added, so a given header's content can be dynamically fetched from an external file and on demand. //**2) Optimized script performance by caching header and content container references var ddaccordion={ ajaxloadingmsg: '
Loading Content...', //customize HTML to output while Ajax content is being fetched (if applicable) headergroup: {}, //object to store corresponding header group based on headerclass value contentgroup: {}, //object to store corresponding content group based on headerclass value // preloadimages:function($images){ // $images.each(function(){ // var preloadimage=new Image() // preloadimage.src=this.src // }) // }, expandone:function(headerclass, selected){ //PUBLIC function to expand a particular header this.toggleone(headerclass, selected, "expand") }, collapseone:function(headerclass, selected){ //PUBLIC function to collapse a particular header this.toggleone(headerclass, selected, "collapse") }, expandall:function(headerclass){ //PUBLIC function to expand all headers based on their shared CSS classname var $headers=this.headergroup[headerclass] this.contentgroup[headerclass].filter(':hidden').each(function(){ $headers.eq(parseInt($(this).attr('contentindex'))).trigger("evt_accordion") }) }, collapseall:function(headerclass){ //PUBLIC function to collapse all headers based on their shared CSS classname var $headers=this.headergroup[headerclass] this.contentgroup[headerclass].filter(':visible').each(function(){ $headers.eq(parseInt($(this).attr('contentindex'))).trigger("evt_accordion") }) }, toggleone:function(headerclass, selected, optstate){ //PUBLIC function to expand/ collapse a particular header var $targetHeader=this.headergroup[headerclass].eq(selected) var $subcontent=this.contentgroup[headerclass].eq(selected) if (typeof optstate=="undefined" || optstate=="expand" && $subcontent.is(":hidden") || optstate=="collapse" && $subcontent.is(":visible")) $targetHeader.trigger("evt_accordion") }, ajaxloadcontent:function($targetHeader, $targetContent, config, callback){ var ajaxinfo=$targetHeader.data('ajaxinfo') function handlecontent(content){ //nested function if (content){ //if ajax content has loaded ajaxinfo.cacheddata=content //remember ajax content ajaxinfo.status="cached" //set ajax status to cached if ($targetContent.queue("fx").length==0){ //if this content isn't currently expanding or collapsing $targetContent.hide().html(content) //hide loading message, then set sub content's HTML to ajax content ajaxinfo.status="complete" //set ajax status to complete callback() //execute callback function- expand this sub content } } if (ajaxinfo.status!="complete"){ setTimeout(function(){handlecontent(ajaxinfo.cacheddata)}, 100) //call handlecontent() again until ajax content has loaded (ajaxinfo.cacheddata contains data) } } //end nested function if (ajaxinfo.status=="none"){ //ajax data hasn't been fetched yet $targetContent.html(this.ajaxloadingmsg) $targetContent.slideDown(config.animatespeed) ajaxinfo.status="loading" //set ajax status to "loading" $.ajax({ url: ajaxinfo.url, //path to external menu file error:function(ajaxrequest){ handlecontent('Error fetching content. Server Response: '+ajaxrequest.responseText) }, success:function(content){ content=(content=="")? " " : content //if returned content is empty, set it to "space" is content no longer returns false/empty (hasn't loaded yet) handlecontent(content) } }) } else if (ajaxinfo.status=="loading") handlecontent(ajaxinfo.cacheddata) }, expandit:function($targetHeader, $targetContent, config, useractivated, directclick, skipanimation){ var ajaxinfo=$targetHeader.data('ajaxinfo') if (ajaxinfo){ //if this content should be fetched via Ajax if (ajaxinfo.status=="none" || ajaxinfo.status=="loading") this.ajaxloadcontent($targetHeader, $targetContent, config, function(){ddaccordion.expandit($targetHeader, $targetContent, config, useractivated, directclick)}) else if (ajaxinfo.status=="cached"){ $targetContent.html(ajaxinfo.cacheddata) ajaxinfo.cacheddata=null ajaxinfo.status="complete" } } this.transformHeader($targetHeader, config, "expand") $targetContent.slideDown(skipanimation? 0 : config.animatespeed, function(){ config.onopenclose($targetHeader.get(0), parseInt($targetHeader.attr('headerindex')), $targetContent.css('display'), useractivated) if (config.postreveal=="gotourl" && directclick){ //if revealtype is "Go to Header URL upon click", and this is a direct click on the header var targetLink=($targetHeader.is("a"))? $targetHeader.get(0) : $targetHeader.find('a:eq(0)').get(0) if (targetLink) //if this header is a link setTimeout(function(){location=targetLink.href}, 200) //ignore link target, as window.open(targetLink, targetLink.target) doesn't work in FF if popup blocker enabled } }) }, collapseit:function($targetHeader, $targetContent, config, isuseractivated){ this.transformHeader($targetHeader, config, "collapse") $targetContent.slideUp(config.animatespeed, function(){config.onopenclose($targetHeader.get(0), parseInt($targetHeader.attr('headerindex')), $targetContent.css('display'), isuseractivated)}) }, transformHeader:function($targetHeader, config, state){ $targetHeader.addClass((state=="expand")? config.cssclass.expand : config.cssclass.collapse) //alternate btw "expand" and "collapse" CSS classes .removeClass((state=="expand")? config.cssclass.collapse : config.cssclass.expand) if (config.htmlsetting.location=='src'){ //Change header image (assuming header is an image)? $targetHeader=($targetHeader.is("img"))? $targetHeader : $targetHeader.find('img').eq(0) //Set target to either header itself, or first image within header $targetHeader.attr('src', (state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse) //change header image } else if (config.htmlsetting.location=="prefix") //if change "prefix" HTML, locate dynamically added ".accordprefix" span tag and change it $targetHeader.find('.accordprefix').html((state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse) else if (config.htmlsetting.location=="suffix") $targetHeader.find('.accordsuffix').html((state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse) }, urlparamselect:function(headerclass){ var result=window.location.search.match(new RegExp(headerclass+"=((\\d+)(,(\\d+))*)", "i")) //check for "?headerclass=2,3,4" in URL if (result!=null) result=RegExp.$1.split(',') return result //returns null, [index], or [index1,index2,etc], where index are the desired selected header indices }, getCookie:function(Name){ var re=new RegExp(Name+"=[^;]+", "i") //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return null }, setCookie:function(name, value){ document.cookie = name + "=" + value + "; path=/" }, init:function(config){ document.write('