\n"; } else { echo "\n"; } ?>

Contact Us

\n"; print "var r = document.querySelector(':root');\n"; print "var height = window.screen.height; //constant for the iphone but varies in the android\n"; print "var width = window.screen.width; //constant for the iphone but varies in the android\n"; print "switchvalue(width,height); //make it constant for easier calculation\n"; print "var trueheight;\n\n"; print "var contactus = document.querySelector('.contact_us');\n"; print "var cwidth;\n"; print "var cheight;\n\n"; print "var d;\n"; print "// Initialize resize observer object\n"; print "resizehtml();\n"; print "var m = 980 - cwidth - d;\n\n\n"; print "window.addEventListener('resize', resizehtml); //attach to the resize event and update it as soon as the window size changes.\n\n\n\n"; print "function resizehtml() {\n"; print "// Set the current height and width\n"; print "// to the element\n"; print "cwidth = contactus.clientWidth; //this value varies depending on the orientation of android and iphone\n"; print "cheight = contactus.clientHeight; //this value varies depending on the orientation of android and iphone\n"; print "if (cheight < cwidth) {\n"; print "//landscape\n"; print "trueheight = Math.floor(980 / height * width);\n"; print "} else {\n"; print "//portrait\n"; print "trueheight = Math.floor(980 / width * height);\n"; print "}\n\n"; print "d = Math.floor((trueheight - cheight) / 2);\n\n"; print "r.style.setProperty('--translateY', d + 'px');\n"; print "}\n\n\n"; print "function switchvalue(width0,height0){\n"; print "if (width0 > height0) {\n"; print "height = width0;\n"; print "width = height0;\n"; print "}\n"; print "}\n\n\n"; print "\n"; } ?>