

function viewTip(){
var strForm;
var tempX = 0
var tempY = 0
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.

   /* pos = getElementPosition(obj);*/
	tempX = 100;//pos.left;
    tempY =  100;//pos.top-60;
	
	


if (document.getElementById("tipPopUp")) {
document.getElementById("tipPopUp").style.display="inline";
} else {
var divTag = document.createElement("div");
divTag.id = "tipPopUp";

//divTag.style.position = "absolute";
//divTag.style.top = "" + tempY +"px";
//divTag.style.left= "" + tempX +"px"
divTag.className ="tipPopup";


  
strForm = "<form class='tipForm' id='tipForm' method='post' action='php/sendtip.php' >";


strForm += "<div class='tipHeadline'>Tipsa om " + document.title + "</div>";

strForm += "<label>Till (E-post) * <input  class=\"validate['email'] text-input\" type='text' name='To'/></label>";
strForm += "<label>Från (E-post) * <input type='text' class=\"validate['email'] text-input\" name='Från'/></label>";
strForm += "<label>Från (Namn) *<input type='text' class=\"validate['String'] text-input\" name='Från'/></label>";
strForm += "<label>Meddelande<textarea type='text' class=\"text-input\" name='Namn'></textarea>";
strForm += "<input type=\"button\" name=\"send\" value=\"Skicka\" onclick=\"return  checkForm(document.getElementById('tipForm'))\"/>";

strForm += "</form>";

divTag.innerHTML = "<div class='closeError' onclick=\"document.getElementById('tipPopUp').style.display='none'\"><img src='css/close.png'/></div><div class='errorMessage'>" +  strForm + "</div>";
document.body.appendChild(divTag);
}


}
