var vccpos=document.getElementById(''); if(vccpos){ var vccbox = document.createElement('div'); var vccimg = document.createElement('img'); var vccref = document.createElement('a'); var vccinp = document.createElement('input'); vccbox.appendChild(vccimg); vccbox.appendChild(vccref); vccbox.appendChild(vccinp); vccbox.style.display='block'; vccbox.style.clear='both'; vccbox.style.width='180px'; vccbox.style.height='72px'; vccbox.style.marginTop='2px'; vccbox.style.marginBottom='2px'; vccbox.style.backgroundImage='url(http://www.janinelatus.com/wp-content/plugins/verification-code-for-comments/vcc_bg2.png)'; vccbox.style.backgroundPosition='left left'; vccbox.style.backgroundRepeat='no-repeat'; vccimg.src='http://www.janinelatus.com/wp-content/plugins/verification-code-for-comments/vcode.class.php?m=string&l=4'; vccimg.style.marginTop='10px'; vccimg.style.marginRight='12px'; vccimg.style.marginBottom='9px'; vccimg.style.marginLeft='14px'; vccref.href='javascript:;'; vccref.style.display='inline-block'; vccref.style.width='20px'; vccref.style.height='20px'; vccref.style.marginTop='10px'; vccref.style.marginBottom='9px'; vccinp.name='vcode'; vccinp.type='text'; vccinp.value='string'=='string'?'Enter the above string':'Enter the equation result'; vccinp.style.borderWidth='0'; vccinp.style.color='#999'; vccinp.style.fontStyle='italic'; vccinp.style.width='152px'; vccinp.style.height='15px'; vccinp.style.marginTop='2px'; vccinp.style.marginLeft='14px'; vccpos.parentNode.insertBefore(vccbox, vccpos); vccref.onclick = function(){vccimg.src="http://www.janinelatus.com/wp-content/plugins/verification-code-for-comments/vcode.class.php?m=string&l=4&"+Math.random();} vccinp.onfocus = function(){ if(this.value=='Enter the above string'||this.value=='Enter the equation result'){this.style.fontStyle=''; this.style.color='';this.value='';} } vccinp.onblur = function(){ if(this.value==''){this.style.fontStyle='italic'; this.style.color='#999'; this.value='string'=='string'?'Enter the above string':'Enter the equation result';} } }