Here lies the html/javascript codes on which I have worked my best. Modified to best level I can. If someone else can improve it further please do it :)